Если здесь можно копипасту с комментариями, то к слову о COLD vs. HOT старте на AWS лямбдах :
1. When a function is first invoked, an execution environment is launched and bootstrapped. Once the environment is bootstrapped, your function code executes. Then, Lambda freezes the execution environment, expecting additional invocations.
2. If another invocation request for the function is made while the environment is in this state, that request goes through a warm start. With a warm start, the available frozen container is thawed and immediately begins code execution without going through the bootstrap process.
3. This thaw and freeze cycle continues as long as requests continue to come in consistently. But if the environment becomes idle for too long, the execution environment is recycled.
4. A subsequent request starts the lifecycle over, requiring the environment to be launched and bootstrapped. This is a cold start.
Где под “execution environment is launched and bootstrapped” подразумевается выполнение таких шагов:
1. start container & download code (COLD start)
2. initialize runtime (COLD start)
3. initialize packages & dependencies (COLD start; where billing begins)
4. execute code (WARM START)
Единственное, что непонятно, idle for too long – это сколько?))