1.0.0 • Published 6 years ago

@aiir/lambda-proxy v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

API Gateway Lambda Proxy

Simulates AWS API Gateway with Lambda proxy integration locally for development.

All paths will proxied to the Lambda function as if the API Gateway stage is configured with a standard root and Proxy Resource (e.g. {proxy+}) both configured to use the same Lambda function.

The Lambda function is invoked via the lambci/lambda Docker container, to give a runtime environment as close as possible to the real thing.

Requirements

As well as Node.js 8.10 or later, Docker must also be installed and running on the same machine to run the Lambda emulation container.

Installation

Install the package globally so you can use it easily within your actual Lambda project.

$ npm install -g @aiir\lambda-proxy

This will add a lambda-proxy executable to PATH.

Usage

By default, the script will attempt to start an HTTP server on port 3000 and for any incoming request execute a Node.js 8.10-based Lambda function called handler from index.js from the current directory:

lambda-proxy

You can modify this behaviour through the following environment variables:

Authors

License

MIT