aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.72k stars 3.94k forks source link

[cli] Provide way to skip bundling for lambda-nodejs #11187

Open kyler-hyuna opened 4 years ago

kyler-hyuna commented 4 years ago

Use Case

aws-lambda-nodejs uses parcel for bundling a function's code. Anytime we need to run diff or deploy command whether we made changes or not, parcel will do a build for all functions registered. If you're just making changes to other infra in the stack, this gets annoying.

Proposed Solution

Provide a cli flag to the diff and deploy commands that allows skipping the bundle step.


This is a :rocket: Feature Request

rahulk94 commented 3 years ago

If your application has multiple stacks, the Lambda-NodeJS seems to bundle the functions code even if you are not building a stack which uses that module. This increases the time it takes to run diff and deploy commands even if your actual stack changes are quite small.

rahulk94 commented 3 years ago

After a bit of digging with another developer we've found https://github.com/aws/aws-cdk/commit/37debc0513c5174ca3d918fce94a138d5d34b586 for the Lambda Python module. A similar argument on the Lambda NodeJS module could help achieve the desired behaviour here.

klapro commented 1 year ago

Is this fixed ? With NodeJS CDK it still doing the same long process.. I have updated to the latest CDK 2.82.0 with NodeJS..