AWS Certified Developer – Associate (DVA-C02) — Question 210

A developer is creating an AWS Lambda function that will generate and export a file. The function requires 100 MB of temporary storage for temporary files while running. These files will not be needed after the function is complete.

How can the developer MOST efficiently handle the temporary files?

Answer options

Correct answer: C

Explanation

The /tmp directory in AWS Lambda provides up to 512 MB of temporary storage that is fast and directly accessible during the function's execution, making it the most efficient option for handling temporary files. Other options, such as Amazon EBS or EFS, introduce unnecessary complexity and latency, while S3 incurs additional costs and delays for file transfers.