Package Exports
- aws-lambda
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (aws-lambda) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-lambda
Command line tool to locally run and deploy your node.js application to Amazon Lambda.
Forked from node-lambda Original work here
lambda runInstallation
npm install -g aws-lambdaExample App
The node-lambda-template example app makes it easy to get up and running.
Usage
There are 3 available commands.
lambda setup
lambda run
lambda deployCommands
setup
Initializes the event.json and .env files. event.json is where you mock your event. .env. is where you place your deployment configuration.
$ lambda setup --help
Usage: run [options]
Options:
-h, --help output usage informationAfter running setup, it's a good idea to gitignore the generated event.json and .env file.
echo ".env\nevent.json" >> .gitignorerun
Runs your Amazon Lambda index.js file locally. Passes event.json data to the Amazon Lambda event object.
$ lambda run --help
Usage: run [options]
Options:
-h, --help output usage information
-h, --handler [index.handler] Lambda Handler {index.handler}deploy
Bundles and deploys your application up to Amazon Lambda.
$ lambda deploy --help
Usage: deploy [options]
Options:
-h, --help output usage information
-e, --environment [staging] Choose environment {development, stating, production}
-a, --accessKey [your_key] AWS Access Key
-s, --secretKey [your_secret] AWS Secret Key
-r, --region [us-east-1] AWS Region
-n, --functionName [node-lambda] Lambda FunctionName
-h, --handler [index.handler] Lambda Handler {index.handler}
-m, --mode [event] Lambda Mode
-o, --role [your_role] Amazon role
-m, --memorySize [128] Lambda Memory Size
-t, --timeout [3] Lambda Timeout
-d, --description [missing] Lambda Description
-u, --runtime [nodejs] Lambda RuntimeContributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Running tests
npm install
npm test