The Fastest Node 22 Lambda Coldstart Configuration - Speedrun
Beat bundling by 100 ms
In this post, you learn how to improve Node.js cold start performance by up to 70% by bundling and minifying your code. You also learned how to provide a different version of AWS SDK for JavaScript and that dependencies and how they are imported affects the performance of Node.js Lambda functions. To achieve the best performance, use AWS SDK V3, bundle and minify your code, and avoid top-level imports.
Beat bundling by 100 ms
Minification of Lambda function code seems like a good optimization. In reality, it can increase cold start duration and latency. Here is why.