![aws fargate startup time aws fargate startup time](https://d33wubrfki0l68.cloudfront.net/aa716d56f991a40da03faa6493b2bfcd2f140fd8/0c05d/assets-jekyll/blog/dotnet-aws-fargate/14-signalrclientlibrary-ae2101039098983ed651c42317403e666f85c08edcb5bbb2687eb3c1bd4f6ff9.png)
Calls made during this period are called “warm call”, which means that the code is loaded into memory and ready to be executed when the Lambda is called one or several times.Ĭold start execution has a direct impact on the code execution time of an application. After a cold start, the Lambda will remain instantiated for a while (5 minutes) allowing any other call not to have to wait for this initialization to be done each time. The initialization time of a Lambda represents a significant part of the total time. Because of that, the possibilities for a user to optimize the cold start are a bit limited. This diagram shows that part of the cold start process is managed by AWS (code loading, container creation). What we call “cold start” is the time spent to do this task of Lambda initialization.
![aws fargate startup time aws fargate startup time](https://i.stack.imgur.com/8uA7t.png)
Then, during the execution of the lambda, a container is mounted with the resources defined by the configuration and the code to be executed is loaded into memory. First, you have to create and configure the Lambda: at this step, the code and configuration to execute a Lambda are simply stored somewhere on s3.
![aws fargate startup time aws fargate startup time](https://dt-cdn.net/images/fargate-1165-0748c0cf29.png)
Here are the main steps to execute a Lambda. Chris Munns’ talk at AWS re:invent 2017 gives a good introduction to this topic. To understand what cold start is and how it impacts FaaS code, you need to start by looking at how Function as a Service works.