Skip to main content

Remediation

  1. Open AWS Compute Optimizer β†’ Lambda functions in the affected account and Region, and select the function. Confirm that the recommendation targets $LATEST, reports MemoryOverprovisioned, matches the current memory size, and still reflects the deployed code and configuration. If the function has changed since analysis, wait for a new recommendation.
  2. Review the smaller recommended memory option, projected duration, available performance risk, and estimated monthly savings, including applicable discounts. Performance risk can be empty for overprovisioned functions; do not interpret an empty risk value as a guarantee of safe downsizing. Prioritize changes with a worthwhile financial benefit; zero or unavailable estimated savings alone do not justify a production change.
  3. Benchmark the proposed memory size in a test environment with representative inputs, peak traffic, cold starts, and infrequent workloads. Compare execution duration, memory use, errors, timeouts, and total compute cost with the current configuration. Lower memory also reduces CPU allocation, so retain the current size if the proposed change does not meet performance requirements or reduce cost.
  4. Record the current memory size and deployment revision for rollback. Update the memory setting through the function's existing infrastructure or deployment process. For a manually managed function, open Lambda β†’ Functions β†’ function β†’ Configuration β†’ General configuration β†’ Edit, set Memory, and save. If production traffic uses a published version or alias, validate that version separately and follow the normal version publication and alias rollout process.
  5. Monitor duration, errors, throttling, timeouts, and actual cost after rollout. Restore the previous configuration or route the alias back to the previous version if performance or cost regresses. Allow a fresh analysis window before evaluating the updated configuration again.

Treat the recommendation as a candidate for validation, not an automatic memory reduction.