A latency-sensitive API on Lambda has acceptable median latency but occasional multi-second spikes on the first request after idle. What eliminates these cold-start spikes?
A.Increase function memory
More memory speeds initialization somewhat but doesn't remove the cold start itself.
B.Provisioned concurrency
Correct — pre-warmed environments eliminate the init spike.
C.Move the function into a VPC
VPC attachment historically *added* cold-start time; it's a cause, not a cure.
D.Reduce the deployment package size
Smaller packages marginally reduce init time — provisioned concurrency is the real fix.
Why this answer
Provisioned concurrency keeps N execution environments initialized and warm — first-request latency stays flat regardless of idle gaps. Memory tuning speeds execution but doesn't prevent cold starts.
Correct answer: B · Last reviewed 2026-11-01
Official AWS references
Practice this interactively
Answer without seeing the solution first in the Compute Selection practice session.
Practice Compute Selection