Cross-Account EFS Access for Lambda via VPC Peering
Short answer
B Create a VPC peering connection between the VPCs to allow the primary account's Lambda function to access the secondary account's EFS file system directly.
Question
Key Takeaways
The core concept tested is cross-account resource access; the common trap is choosing data duplication (DataSync) or architectural complexity (secondary Lambda) when simple networking suffices.
This question examines the most cost-effective method for a Lambda function in one AWS account to access an Amazon EFS file system located in another AWS account. The correct solution leverages VPC peering to enable secure, direct network connectivity without duplicating data or adding complex orchestration.
Common mistake: Candidates often select Option A (AWS DataSync) because they overestimate the need for data redundancy or underestimate the simplicity of VPC peering, leading to unnecessary storage costs and operational overhead.
Expert Analysis
Why the Answer Is Correct
Option B is the correct answer because AWS supports mounting Amazon EFS file systems from a different AWS account into a Lambda function's execution environment, provided the necessary network connectivity exists. VPC peering is the standard, low-cost mechanism to connect VPCs across accounts, allowing the primary account's Lambda to reach the secondary account's EFS mount target securely. This approach incurs only the minimal cost of VPC peering traffic (if any, depending on region/account setup) and avoids data transfer fees associated with copying data.
Why the Other Options Are Wrong
Option A is incorrect because creating a duplicate EFS file system using AWS DataSync introduces significant storage costs and maintenance complexity, violating the 'MOST cost-effectively' requirement. Option C adds unnecessary architectural complexity by invoking a second Lambda function, which increases latency and operational overhead compared to direct file system access. Option D is technically invalid as Lambda layers are limited to 250 MB and are designed for code libraries, not large-scale file storage like EFS.
Community Comment Notes
Community consensus strongly favors Option B, with users highlighting that VPC peering provides seamless, secure access without manual scaling efforts. One commenter noted that duplicating the file system leads to 'unnecessary storage costs,' while others pointed out that Lambda layers are unsuitable for this use case due to size constraints and purpose. Comments referenced official AWS documentation confirming that cross-account EFS access requires VPC peering.
Official Reference
- https://docs.aws.amazon.com/efs/latest/ug/efs-different-vpc.html
- https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem-cross-account.html
These links open the official vendor documentation in a new tab.
Exam Strategy
When asked for the 'most cost-effective' solution involving cross-account resources, prioritize native networking features like VPC peering over data replication or additional compute services unless specific performance or isolation requirements dictate otherwise.
Frequently Asked Questions
Why isn't AWS DataSync the best choice here?
Can Lambda access EFS in another account without VPC peering?
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 6 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 6
-
lenotc 👍 8 Answered BB -> VPC peering allows the Lambda access secondary account securely and efficiently A -> redundancy C -> additional complexity D -> sharing code libraries
-
osmk 👍 3 Answered Bhttps://docs.aws.amazon.com/efs/latest/ug/efs-different-vpc.html
-
LeonSauveterre 👍 1 Answered BA - Duplicating the EFS file system leads to unnecessary storage costs and additional complexity. B - VPC peering connection allows seamless access without additional manual scaling. C - Well... I don't know, but you could've directly enabled access to the EFS file system. Why make it even more complex? D - Lambda layers are intended for shared libraries or dependencies. You would be crazy to store large amounts of data there.
-
Scheldon 👍 1 Answered BAnswerB You can configure a function to mount an Amazon EFS file system in another AWS account. Before you mount the file system, you must ensure the following: VPC peering must be configured, and appropriate routes must be added to the route tables in each VPC. . . . https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem-cross-account.html
-
Nm55569 👍 1 Answered Bhttps://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html#configuration-filesystem-cross-account
Show 1 more comment
-
asdfcdsxdfc 👍 1Shouldn't it be B?
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAA-C03 Questions
Access 120 questions with complete answers and detailed explanations.
View Full SAA-C03 Practice Test →