Simple demo application to illustrate debugging NodeJS Lambdas locally.
- LocalStack
- Docker
makeawslocal
To install the dependencies:
make installYou can start LocalStack with Docker Compose:
docker-compose up -dAlternatively, you can use the following localstack CLI configuration:
LAMBDA_DOCKER_FLAGS='-e NODE_OPTIONS=--inspect-brk=0.0.0.0:9229 -p 9229:9229' \
localstack start -dThe project ships with a Visual Studio Code debug launch config (see .vscode/launch.json). This configuration can be used to attach to the code in the Lambda function while it is executing.
The following command deploys the Lambda and finally invoke the Lambda locally:
make runThe code in this sample is available under the Apache 2.0 license.