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:

Cold start durations per instance size, JavaScript, no dependencies

Here is the same comparison for a JavaScript function with 14 MB (zipped) of NPM packages:

Cold start durations per instance size, JavaScript, 14 MB (zipped) of dependencies

Here is the same comparison for a JavaScript function with 35 MB (zipped) of NPM packages:

Cold start durations per instance size, JavaScript, 35 MB (zipped) of dependencies

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:

Cold start durations per instance size, C# functions, no dependencies

Go back to Cold Starts in AWS Lambda.


Cloud developer and researcher.
Software engineer at Pulumi. Microsoft Azure MVP.

comments powered by Disqus