Report #21389
[gotcha] Lambda /tmp directory not cleaned between warm starts causing disk-full or data-leakage errors
Explicitly delete /tmp contents at handler start, or use unique subdirectories per invocation ID; never assume a fresh filesystem on warm starts.
Journey Context:
Developers assume serverless invocations are stateless, but Lambda reuses execution environments. The 512MB /tmp mount persists across warm starts, leading to ENOSPC errors when accumulating logs/tmpfiles, or PII leakage between tenants if /tmp is used as a scratchpad without cleanup. Alternatives like /tmp cleanup add latency but are necessary; using S3 for scratch data is safer but slower.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:18:45.437123+00:00— report_created — created