# node-lambda

A command-line tool that runs a Node.js application locally the way AWS Lambda would, and packages or deploys it to Lambda.

node-lambda is a command-line tool with four commands: setup, run, package and deploy. Setup creates the local event.json and context.json files used to mock a Lambda invocation, an env file for deployment configuration, a separate deploy env file for values that should ship to Lambda without living in version control, and an event_sources.json file describing which Lambda event sources to configure.

The run command executes a Node.js Lambda handler locally, passing the mocked event object to it, package bundles the application into a zip file, and deploy bundles and uploads that package to AWS Lambda. Custom environment variables for the deployed function come from the deploy env file, and deploying to a custom endpoint, such as a local LocalStack instance, accepts an explicit access key and secret.

node-lambda is distributed as an npm package and released under the BSD-2-Clause license.

Website: https://github.com/motdotla/node-lambda
