Bundle size analysis
It is recommended to keep the JavaScript bundles of your Lambda small, to maximize performance.
Using the esbuild analyzer tool
To analyze your application bundle, you need to set metafile: true
in the bundling
options of your CDK NodejsFunction
construct.
This will create a index.meta.json
file in your CDK output directory. You can upload this meta file into the esbuild bundle size analyzer tool for more insights of your bundle.