How to provide Lambda access to shared data and libraries?
Short answer
C Set up an Amazon Elastic File System (Amazon EFS) file system with mount targets in the central VPConfigure the Lambda functions to mount the EFS file system. Update the Lambda function execution roles to give the functions to access the EFS file system.
Question
Key Takeaways
This question tests the ability to integrate persistent shared storage with Lambda, specifically distinguishing between the compatible EFS service and the incompatible EBS service.
To provide AWS Lambda functions with access to shared libraries and reference data that require independent updates, Amazon Elastic File System (Amazon EFS) is the optimal solution. The community consensus confirms that mounting an EFS file system allows Lambda functions to persistently access shared data within a VPC.
Common mistake: Selecting Amazon EBS is a common error because EBS volumes are strictly for EC2 instances and cannot be attached to Lambda functions.
Expert Analysis
Why the Answer Is Correct
Amazon EFS provides a scalable, elastic file system that supports network file system (NFS) protocols, making it ideal for Lambda functions running in a VPC. It allows concurrent read/write access, enabling separate teams to update libraries and data independently without modifying the Lambda function code or deployment packages. This architecture satisfies the requirement for shared, persistent storage accessible by multiple compute resources.
Why the Other Options Are Wrong
Option A is incorrect because Lambda functions do not support attaching Amazon EBS volumes; EBS is block storage designed exclusively for EC2 instances. Option B is incorrect because the /tmp directory is ephemeral, local to the specific execution environment, and limited in size (up to 10 GB), making it unsuitable for sharing data across different functions or teams. Option D is incorrect because Amazon FSx for Windows File Server relies on SMB protocols, which are not natively compatible with the Linux-based environment where Lambda functions operate.
Community Comment Notes
Community members unanimously selected Option C, emphasizing that EBS cannot be used with Lambda. Several comments cited official AWS documentation regarding Lambda configuration for file systems, reinforcing that EFS is the standard best practice for providing shared file access to serverless functions in a VPC.
Official Reference
- https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html
- https://docs.aws.amazon.com/lambda/latest/dg/services-efs.html
These links open the official vendor documentation in a new tab.
Exam Strategy
Remember that Lambda functions are ephemeral and stateless. Whenever the scenario requires persistent, shared, or large-scale file storage accessible by multiple functions or teams, immediately identify Amazon EFS as the correct service and rule out EBS.
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 4 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 4
-
chris_spencer 👍 3 Answered CConfigure a function to mount an Amazon Elastic File System (Amazon EFS) file system to a local directory https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html
-
Arnaud92 👍 2 Answered CCan't use EBS volumes with Lambda, used with EC2 only.
-
albert_kuo 👍 1 Answered CC. Set up an Amazon Elastic File System (Amazon EFS) file system with mount targets in the central VPConfigure the Lambda functions to mount the EFS file system. Update the Lambda function execution roles to give the functions to access the EFS file system.
-
komorebi 👍 2 Answered CAnsswer is c
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →