AWS Certified Data Engineer – AssociateData Storage and ManagementHard

A data engineering team is building a serverless data processing pipeline using AWS Lambda. The Lambda functions need to process large input files (up to 500 MB) and generate intermediate output files, requiring temporary storage that is accessible across multiple invocations within a short period and can be shared between different Lambda functions if needed. The storage solution must be highly performant for file I/O and automatically scale. Which AWS service should they use for this temporary, shared file storage?

  1. AAWS Lambda /tmp directory
  2. BAmazon S3
  3. CAmazon EBS
  4. DAmazon EFS
Show answer & explanation

Correct answer: D. Amazon EFS

Amazon EFS (Elastic File System) is a scalable, elastic, cloud-native NFS file system that can be mounted to multiple Lambda functions concurrently. It provides shared, persistent storage with high throughput and low latency, making it ideal for scenarios where Lambda functions need to access and share large files or maintain state across invocations beyond the ephemeral /tmp directory.

Why the other options are wrong

  • A. The `/tmp` directory in Lambda is ephemeral, limited to 512 MB to 10 GB (configurable), and not shared across invocations or functions, making it unsuitable for persistent or shared large file storage.
  • B. Amazon S3 is object storage and while it can store large files, it's not designed for file system semantics (like mounting and shared access across multiple Lambda functions) or the low-latency, high-throughput file I/O required for processing intermediate files within a function's execution environment.
  • C. Amazon EBS (Elastic Block Store) volumes can only be attached to a single EC2 instance at a time and cannot be directly mounted by AWS Lambda functions.

Amazon EFS for AWS Lambda

Amazon EFS provides scalable, shared, and persistent file storage that can be mounted by AWS Lambda functions, enabling them to process large files and share data across invocations.

  • Persistent storage for Lambda functions
  • Shared access across multiple Lambda functions
  • Scalable and elastic file system
  • Supports file system semantics (NFS)
  • Overcomes `/tmp` directory limitations for large files and shared state

Memory trick: EFS is the 'Elastic File Share' for your Lambda data needs.

More Data Storage and Management questions