Report #16719
[gotcha] Lambda function returns stale data or fails intermittently due to leftover files in /tmp from previous invocations
Explicitly clean /tmp at the start of every handler or use ephemeral storage; never assume a fresh filesystem
Journey Context:
Lambda reuses execution contexts for performance, meaning /tmp persists between 'warm' invocations. Developers often treat /tmp as scratch space assuming isolation per request, leading to Heisenbugs where state leaks between users or runs. Detecting warm starts is fragile; deterministic cleanup is the only robust pattern.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T03:21:58.044171+00:00— report_created — created