🟢

AWS Lambda – Cold Starts & Provisioned Concurrency

Cold Start

  • Happens when AWS creates a new execution environment for a Lambda function.
  • Involves loading the code package and running initialization code (outside the handler).
  • Large dependencies, heavy SDKs, or complex initialization increase latency.
  • Only the first invocation on a new environment is affected; subsequent requests on the same environment are warm starts (no extra init delay).

Provisioned Concurrency

  • Pre-warms a set number of Lambda environments so they’re ready before invocation.
  • Eliminates cold start latency for all requests.
  • Managed via Application Auto Scaling, triggered by schedule or utilization metrics.

Additional Notes