Load tests must find the smallest Lambda memory setting that still meets p95 latency for a city PDF-merge function. What is the right optimization goal?
Select an answer to reveal the explanation.
Short Explanation
Lambda memory is also CPU—so more isn't automatically 'better,' it's just pricier. Load-test until you find the smallest setting that still clears p95 for PDF merge. That's the sweet spot between citizen wait time and the city bill.
Full Explanation
Load tests that must find the smallest Lambda memory setting still meeting p95 latency for a city PDF-merge function should select the minimum memory/compute that satisfies the latency SLO under load. Memory on Lambda also scales CPU; the optimization goal is right-sizing to SLO, not maximizing spend or freezing at 128 MB regardless of measurements.
Always choosing maximum memory so cost never matters fails the minimum-that-meets-SLO objective.
Setting memory to 128 MB forever regardless of measured p95 ignores empirical load-test results.
Ignoring latency and sizing memory only by /tmp directory size optimizes the wrong constraint for a PDF-merge SLO.
Exam caveat: Right-size Lambda memory against latency SLOs using load tests—this is a common performance question pattern.
Operational check: Run stepped memory experiments under representative PDF-merge load, plot p95 versus cost, pick the smallest memory that clears the SLO with margin, and encode that setting in IaC for the city function. Keep the civic/municipal context in mind: PDF merges are CPU-sensitive; undersized memory causes citizen timeouts while oversized memory wastes budget. Document the finding in the municipal incident ticket so the next on-call engineer inherits evidence rather than folklore.