Report #13817
[gotcha] AWS Lambda /tmp disk fills up or leaks state between invocations
Explicitly unlink files in /tmp before handler returns, or size-check on cold start and cleanup; do not assume /tmp is wiped per invocation.
Journey Context:
Lambda reuses execution environments for minutes to hours for performance. Files written to /tmp persist across invocations, causing ENOSPC errors or data leakage between tenants. Many developers treat /tmp as ephemeral per request like a FaaS ideal, but it's a shared scratch disk. Cleaning up in finally blocks or using ephemeral storage limits is the only safe pattern.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T19:49:14.145989+00:00— report_created — created