0

I’m working with an AWS Lambda function written in Node.js, and I have a package.json file with several dependencies installed.

For local debugging, I downloaded the SAM template from AWS Lambda via the console, and I’ve configured the Run Configuration in WebStorm following the instructions from these guides (samples are for Python & PyCharm but same config applies for Node & WebStorm):

However, each time I attempt to debug my Lambda function, the sam build command installs all Node.js dependencies, which significantly slows down the process (approximately 3 minutes each time).

Is there a way to bypass this dependency installation phase and use the node_modules directory locally instead?

I have checked the sam command reference: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-command-reference.html but I didn´t found an option to skip the build phase. Moreover, I´m not sure if this phase can be skipped with WebStorm.

Any tips or optimal configuration suggestions would be appreciated!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.