How to provide Lambda access to shared data and libraries?

A developer has AWS Lambda functions that need to access a company's internal data science libraries and reference data. Separate teams manage the libraries and the data. The teams must be able to update and upload new data independently. The Lambda functions are connected to the company's central VPC. Which solution will provide the Lambda functions with access to the libraries and data?

  1. Attach an Amazon Elastic Block Store (Amazon EBS) volume to the Lambda functions by using EBS Multi-Attach in the central VPC. Update the Lambda function execution roles to give the functions to access the EBS volume. Update the Lambda function code to reference the files in the EBS volume.
  2. Compress the libraries and reference data in a Lambda /tmp folder. Update the Lambda function code to reference the files in the /tmp folder.
  3. 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. Source Reference Answer
  4. Set up an Amazon FSx for Windows File Server file system with mount targets in the central VPC. Configure the Lambda functions to mount the Amazon FSx file system. Update the Lambda function execution roles to give the functions to access the Amazon FSx file system.

Community Votes

C
100%

100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

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.

Selecting Amazon EBS is a common error because EBS volumes are strictly for EC2 instances and cannot be attached to Lambda functions.

Community Discussion (4 comments)

Arnaud92 👍 2 Selected: C
Can't use EBS volumes with Lambda, used with EC2 only.
chris_spencer 👍 3 Selected: C
Configure 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
komorebi 👍 2 Selected: C
Ansswer is c
albert_kuo 👍 1 Selected: C
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.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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

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.

Related Analysis

Practice All DVA-C02 Questions

Access 100 questions with complete answers and detailed explanations.

View Full DVA-C02 Practice Test →

← Back to DVA-C02 Study Guide