Michele Riso
Jul 28, 2021

--

Hi Shuvo, AWS Lambda works as follow:

1) When you invoke a lambda function the first time, AWS creates a container (cold start)

2) AWS executes your lambda inside the container

3) After the execution, AWS put the lambda in a pool for some time (about 15 min) to be resued

4) Next execution, AWS checks if there is any container available and uses that one (warm start)

You pay only for the time the lambda executes, not for the time the Lambda container is put in the pool and kept warm

What above is true for the normal AWS Lambda flow (e.g. using the Serverless Framework warmer lambda covered in the first part of the article)

That's different if you use Provisioned Concurrency as in that case you pay for the whole time the Lambda is available for you

--

--

Michele Riso

Cloud Architect — Cloud Modernisation SME — Serverless SME — #AWS #Azure #Openshift linkedin.com/in/micheleriso