You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
Lambdas are pretty huge. They are obviously including lots of stuff which we shouldnt package in them. aws-cdk-lib is the obvious one. It is normally down to module resolution in commonjs.
Expected Outcomes:
Know what the issue is and the most pragmatic way to fix it.
The text was updated successfully, but these errors were encountered:
mattzcarey
changed the title
[Bug] Lambdas are including aws-cdk-lib in the bundle
[Bug] [2h Timebox] Lambdas are including aws-cdk-lib in the bundle
Sep 7, 2023
These are the current sizes of our staging lambdas: staging-get-user-lambda
9.8 MB staging-update-user-lambda
9.9 MB staging-demo-review-lambda
10.4 MB staging-review-lambda
1.2 MB
This is big but not enormous. Options were explored for resolving this issue.
We are building the code in services/core using tsc. After an andon with Ryan, he suggested that if we built the code with esbuild, we can use this site to analyse which packages are making it into our production build. esbuild should also create a better build than tsc.
The follow up suggestion is therefore to use esbuild rather than tsc as our bundler, for both bundle size and observability.
Description:
Lambdas are pretty huge. They are obviously including lots of stuff which we shouldnt package in them. aws-cdk-lib is the obvious one. It is normally down to module resolution in commonjs.
Expected Outcomes:
Know what the issue is and the most pragmatic way to fix it.
The text was updated successfully, but these errors were encountered: