-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(CLI): Building & Publishing of assets happen even when there are no changes to them (aws-lambda-nodejs) #22214
Comments
+1 - this would save a huge amount of time spend re-building files that haven't changed |
There might be a way to solve this by manually specifying |
How much time does it take? |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
I have added |
But... If we avoid deployment & building (which means: zipping lambda code, sending new lambda code to AWS & deploying new lambda version) it would safe ~400-450 sec from our deployment time for sure (~70 lambdas). |
Is there any chance to work on that @rix0rrr. I would love to help, but I am not that educated in CDK from behind the scenes, so I am uncertain how we shall proceed with that one. |
I see the same for the
|
Unfortunately, the current behavior is unavoidable the way bundling is currently being done. The bundling build happens during I am aware that the current bundling story is not great, and have some ideas for improvements, but for now this is what it is, unfortunately. I'm thinking that caching the |
Hmm, what do you exactly mean by caching |
Describe the bug
I've added custom mechanism to ensure we do not have to
esbuild
assets each time when there are no code changes. But on CLI level these assets are build and published anyways. I don't see any possibility to change that.Building happens here:
aws-cdk/packages/aws-cdk/lib/cdk-toolkit.ts
Line 175 in 34c7b9e
Publishing:
aws-cdk/packages/aws-cdk/lib/api/cloudformation-deployments.ts
Line 402 in 34c7b9e
I've looked also into
--exclude-build
, but it seems it is not used withaws-lambda-nodejs
...Expected Behavior
Do not build & publish assets, which haven't changed.
Current Behavior
Assets are being build and published.
Reproduction Steps
Use
aws-lambda-nodejs
and deploy stack with Lambda(s).Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.43.0
Framework Version
No response
Node.js Version
16.13.0
OS
MacOS 12.2.1
Language
Typescript
Language Version
TypeScript (4.7.4)
Other information
No response
The text was updated successfully, but these errors were encountered: