AWS Lambda: Cold Start Duration per Instance Size
AWS Lambda has a setting to define the memory size that gets allocated to a single instance of a function. The CPU resources are allocated proportionally to the memory. So, in theory, larger instances could start faster.
However, for most runtimes, there seems to be no significant speed-up of the cold start as the instance size grows.
Here is the comparison for a “Hello-World” JavaScript function:
Here is the same comparison for a JavaScript function with 14 MB (zipped) of NPM packages:
Here is the same comparison for a JavaScript function with 35 MB (zipped) of NPM packages:
None of the charts shows a considerable advantage of larger instance sizes for the cold starts.
However, .NET (C#/F#) functions are the exception. The bigger the instance, the faster startup time it has:
Go back to Cold Starts in AWS Lambda.