Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 987 Bytes

File metadata and controls

47 lines (30 loc) · 987 Bytes

LocalStack Demo: Lambda Code Mounting and Debugging

Simple demo application to illustrate debugging NodeJS Lambdas locally.

Prerequisites

Installation

To install the dependencies:

make install

Starting Up

You can start LocalStack with Docker Compose:

docker-compose up -d

Alternatively, 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 -d

Running the sample

The 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 run

License

The code in this sample is available under the Apache 2.0 license.