Closed mattzcarey closed 4 months ago
Actual outcomes:
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.
Follow up ticket: https://github.com/users/mattzcarey/projects/1/views/1?pane=issue&itemId=38625966
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.