Below is a diagram (taken from AWS.training) that’s the result of a Lambda cold start, using AWS X-Ray.
In this example, an object is added to an S3 bucket, which asynchronously triggers the Lambda function invocation.
- Asynchronous push events are queued
The diagram below is for a Lambda warm start.
Note the shorter duration.
Cold start: 878ms
Warm start: 199ms
The important fact is the lower billed duration of the warm start.
Cold start: 558ms (297 + 261)
Warm start: 82ms