aws-cdk-lib: it is not being bundled and full size library is added to lambda function #25080
Labels
@aws-cdk/aws-lambda-nodejs
aws-cdk-lib
Related to the aws-cdk-lib package
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p1
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
I think the issue goes as follow:
aws-cdk-lib is published already bundled as mentioned in #20561 and when NodeJsFunction bundles the code, it is not bundling aws-cdk-lib (because it is already bundled) and full size library is added to lambda function deployment package.
The result is a lambda function with 6.8MB more. It is making lambda function cold start times really high.
PS: CCXT is also published minified and same thing happens as you can see in the picture
Expected Behavior
aws-cdk-lib to be bundled by NodeJsFunction
Current Behavior
full size aws-cdk-lib library is added to lambda function deployment package
Reproduction Steps
.
Possible Solution
aws-cdk-lib to be published without bundling/minifying
Additional Information/Context
No response
CDK CLI Version
2.69.0
Framework Version
No response
Node.js Version
v18.12.1
OS
MacOS
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: