Skip to content
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

aws-cdk-lib: it is not being bundled and full size library is added to lambda function #25080

Closed
Sevi7 opened this issue Apr 12, 2023 · 5 comments
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.

Comments

@Sevi7
Copy link

Sevi7 commented Apr 12, 2023

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.

image (2)

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

@Sevi7 Sevi7 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 12, 2023
@github-actions github-actions bot added the aws-cdk-lib Related to the aws-cdk-lib package label Apr 12, 2023
@mattiamatrix
Copy link
Contributor

Is it related to #23873?

@Sevi7
Copy link
Author

Sevi7 commented Apr 12, 2023

Is it related to #23873?

No, nothing to do with aws-sdk-v3. Just aws-cdk-lib

@pahud
Copy link
Contributor

pahud commented Apr 13, 2023

Thank you for the insightful feedback. I am making it p1 for more visibility.

@pahud pahud added p1 effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. and removed needs-triage This issue or PR still needs to be triaged. bug This issue is a bug. labels Apr 13, 2023
@corymhall
Copy link
Contributor

@Sevi7 can you explain more about your use case I'm not sure I understand what you are trying to accomplish.

@corymhall corymhall added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Apr 21, 2023
@github-actions
Copy link

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.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Apr 23, 2023
@github-actions github-actions bot added closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

5 participants