aws / aws-sam-cli

CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
https://aws.amazon.com/serverless/sam/
Apache License 2.0
6.5k stars 1.17k forks source link

Hot reloading #2800

Open rnjailamba opened 3 years ago

rnjailamba commented 3 years ago

Describe your idea/feature/enhancement

We use SAM CLI to run lambda's successfully with the following command - sam local start-api --template samtemplate.yml --env-vars env.json --skip-pull-image --warm-containers EAGER. Using this command mitigates the per request building of the image/ container but still hot reloading is considerably slow and takes 10s+ for every change saved. I wish SAM CLI would handle this in a faster way.

Proposal

Changes in code can be applied to the container using volumes with docker -v command, this could be a solution to this issue if none other exists. Things to consider:

  1. Will this require any updates to the SAM Spec
sriram-mv commented 3 years ago

What kind of runtime are using? is the issue with compiled languages? could you provide more detail?

rnjailamba commented 3 years ago

We are using nodejs 14.x @sriram-mv .