What is a Lambda cold start?
BeginnerConceptContainers and Serverless
Answer
When no warm execution environment is available, Lambda creates one: download code, start the runtime, run your initialization code outside the handler, then invoke. This adds latency from tens of milliseconds (Go, Rust, Node) to seconds (large Java or .NET functions, VPC-attached in the past). Subsequent invocations reuse the environment (warm).
Reduce it by shrinking packages, lazy-loading, using arm64, SnapStart or provisioned concurrency.
More on Containers and Serverless
ECS vs EKS vs Fargate: what is the relationship?BeginnerWhat are ECS task definitions, tasks and services?BeginnerWhat are ECS capacity providers?IntermediateWhat is the difference between the ECS task role and the task execution role?IntermediateHow does `awsvpc` network mode work in ECS?IntermediateWhat deployment strategies does ECS support?Advanced