InterviewHubPRO
Section Overview
Q27

Question 27 of 65

Part 3: Compute, Containers & Serverless (21 - 35)

42%
AWS Cloud Architecture•Part 3: Compute, Containers & Serverless (21 - 35)

Lambda Cold Starts & Mitigation Strategies.

In Simple Words: A cold start happens during the Init phase when AWS provisions a new microVM container for your function. How to Mitigate:

  1. Provisioned Concurrency: Keeps pre-warmed execution environments ready 24/7 for zero cold-start latency.
  2. Keep deployment packages small (bundle with esbuild, tree-shake unused dependencies).
  3. Initialize database connection pools and SDK clients outside the handler function so they are reused across invocations.
bash
# Configure Provisioned Concurrency via AWS CLI:
aws lambda put-provisioned-concurrency-config   --function-name CheckoutService   --qualifier live   --provisioned-concurrent-executions 10