JSPM

  • Created
  • Published
  • Downloads 6781
  • Score
    100M100P100Q120981F
  • License BSD

Deploy your node.js application to Amazon Lambda

Package Exports

  • node-lambda
  • node-lambda/bin/node-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 (node-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

Deploy your node.js application to Amazon Lambda.

BuildStatus NPM version

Installation

npm install -g node-lambda

Usage

Run your Amazon Lambda app locally.

node-lambda run

When ready to deploy for the first time, run the following.

node-lambda setup
echo ".env\nevent.json" >> .gitignore
node-lambda deploy -e staging

You can subsequenetly, just call the following.

node-lambda deploy -e staging

Command line flags

You can opt to use command line flags instead of a .env. file.

run [flags]

node-lambda run [flags]
Example
./node_modules/.bin/node-lambda run --help

  Usage: run [options]

  Options:

    -h, --help                     output usage information
    -h, --handler [index.handler]  Lambda Handler {index.handler}

deploy [flags]

node-lambda deploy [flags]
Example
./node_modules/.bin/node-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 Runtime