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

Ensure Lambda Bundles are of expected size #1471

Open
mrgrain opened this issue Sep 18, 2024 · 0 comments
Open

Ensure Lambda Bundles are of expected size #1471

mrgrain opened this issue Sep 18, 2024 · 0 comments

Comments

@mrgrain
Copy link
Contributor

mrgrain commented Sep 18, 2024

Description

The handlers for a number of Lambda Function are larger than they need to be. Smaller bundles mean a shorter cold start time. In the past some of these were also unintentionally bundling aws-cdk-lib which will cause the handler size to be very large (10mb to 50mb) and bundle potentially disruptive dependencies. This has already caused issues in the past but was never rolled out to any bundles other than the transliteration one from the original incident.

We need to make some effort to ensure bundle sizes are minimal and add checks to ensure they stay like this.

  • Only include aws-sdk v3 client packages that are actually needed
  • Always exclude aws-cdk-lib from bundling so that code fails fast if used
  • Add checks to the build system that ensure all bundles are within expected parameters, fail otherwise

Use Case

No response

Other information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant