Logo The David Page
  • Home
  • About
  • Featured Posts
  • Recent Posts
  • Posts
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo Inverted Logo
  • Posts
  • Cloud
    • AWS
      • CloudFront
        • CloudFront Flat-Rate Migration
      • Networking & VPC
        • Cross-AZ Data Transfer Cost
        • MTU 9001 / PMTUD Black Hole
        • NAT Gateway & S3 Gateway Endpoint
      • DynamoDB
        • DynamoDB On-Demand Ceiling
      • CloudWatch
        • CloudWatch Logs Insights Cost
      • S3
        • Glacier Small-Files Cost Trap
        • Incomplete Multipart Uploads
      • IAM
        • iam:PassRole Privilege Escalation
      • EC2
        • HTTP 429 – Gemini API on AWS
        • IMDSv2 Hop Limit / Containers
      • Lambda
        • Lambda /tmp Warm Start Persistence
      • RDS
        • RDS Proxy & CloudWatch Cost
    • Azure
      • Front Door
        • WAF Policy ArmResourceId Error
Hero Image
AWS Lambda's /tmp Directory Isn't as Clean as You Think

Assuming every Lambda invocation runs in a fresh, isolated environment is a very reasonable guess. It’s also wrong. Hi everyone 👋 A lot of developers write Lambda functions on the assumption that each invocation starts in a completely clean, isolated sandbox — new environment, empty disk, nothing left behind from whatever ran before. That assumption is exactly what “serverless” seems to promise. It isn’t quite what happens. 🔍 What’s actually happening: warm starts To keep invocations fast, Lambda reuses the same underlying execution environment (container) for consecutive invocations whenever it can — this is a warm start, as opposed to spinning up a brand-new one from scratch (a cold start). Reusing the container is exactly what makes warm invocations fast.

  • AWS
  • Lambda
  • Serverless
  • Security
Sunday, August 2, 2026 Read
Navigation
  • About
  • Featured Posts
  • Recent Posts
Contact me:
  • hi@thedavidlee.space

© 2026 Copyright.