QuestionQ85

VerifiedDeployment

A developer is designing an AWS Lambda function that creates temporary files that are less than 10 MB during invocation. The temporary files will be accessed and modified multiple times during invocation. The developer has no need to save or retrieve these files in the future.

Where should the temporary files be stored?

Explanation

AWS Lambda provides ephemeral storage in the /tmp directory with 512 MB to 10,240 MB of capacity, specifically designed for temporary file access during function execution. The files are automatically cleaned up after invocation completes. EFS adds unnecessary latency and complexity; EBS volumes are not attached to Lambda functions; S3 is not optimized for rapid read/write operations during execution and incurs per-operation costs for temporary files.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!