A municipal Lambda behind API Gateway must remain safe to scale to zero and multiply under load. Developers debate storing citizen wizard progress inside the function container. What should they do?
Select an answer to reveal the explanation.
Short Explanation
Lambda containers come and go like borrowed desks — do not leave the citizen's wizard notes in the drawer. Save progress in DynamoDB (or similar) and treat each invoke as stateless. That stays safe when the function scales to zero or fans out.
Full Explanation
Lambda execution environments are not a durable session store: they can freeze, recycle, or route the next request elsewhere. Externalizing wizard state keeps handlers idempotent and horizontally scalable. /tmp, module globals, and single-concurrency RAM tricks fail under scale-to-zero, multi-container concurrency, or cold starts. API Gateway plus Lambda favors request-scoped, externally persisted state.