AWS Certified Developer – Associate — Question 94
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?
Answer options
- A. the /tmp directory
- B. Amazon Elastic File System (Amazon EFS)
- C. Amazon Elastic Block Store (Amazon EBS)
- D. Amazon S3
Correct answer: A
Explanation
The correct answer is A, the /tmp directory, as AWS Lambda provides a 512 MB storage space in the /tmp directory for temporary file storage during execution. Options B and C, Amazon EFS and Amazon EBS, are designed for persistent storage, which is unnecessary in this scenario since the files do not need to be retained. Option D, Amazon S3, is also for persistent storage and is not suitable for temporary files needed only during a single invocation.