AWS Certified Solutions Architect – Associate (SAA-C03) — Question 761

A company needs to create an AWS Lambda function that will run in a VPC in the company's primary AWS account. The Lambda function needs to access files that the company stores in an Amazon Elastic File System (Amazon EFS) file system. The EFS file system is located in a secondary AWS account. As the company adds files to the file system, the solution must scale to meet the demand.

Which solution will meet these requirements MOST cost-effectively?

Answer options

Correct answer: B

Explanation

Establishing a VPC peering connection between the primary and secondary accounts allows the Lambda function to securely mount and access the remote EFS file system over a private network connection, which is highly cost-effective and scalable. Replicating the data with AWS DataSync (Option A) or invoking a secondary Lambda function (Option C) introduces unnecessary overhead, replication costs, and execution latency. Using a Lambda layer (Option D) is unfeasible because layers have strict storage limit constraints (250 MB unzipped) and cannot dynamically scale like EFS.