A company needs an AWS Lambda function in its primary account VPC to access files stored in an Amazon EFS file system in a secondary account. As files are added, the solution must scale to meet demand and be cost-effective. Which solution meets these requirements MOST cost-effectively?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a VPC peering connection between the VPCs in the primary account and the secondary account..
Why this is the answer
Creating a VPC peering connection between the VPCs in the primary and secondary accounts allows the Lambda function in the primary account's VPC to directly access the EFS file system in the secondary account. EFS supports mounting across VPC peering connections, enabling the Lambda function to access the files as if they were in the same VPC. This is a cost-effective and scalable solution as VPC peering itself has no hourly charge for the connection, and data transfer costs are minimal within the same AWS region. Creating a new EFS in the primary account and using DataSync would incur additional storage and DataSync costs. A second Lambda function in the secondary account would add complexity, latency, and additional Lambda invocation costs. Moving contents to a Lambda layer is impractical for large or frequently changing file systems, as layers have size limits and are not designed for dynamic file storage.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed