AWS Certified Developer – Associate (DVA-C02) — Question 32

A company has deployed infrastructure on AWS. A development team wants to create an AWS Lambda function that will retrieve data from an Amazon Aurora database. The Amazon Aurora database is in a private subnet in company's VPC. The VPC is named VPC1. The data is relational in nature. The Lambda function needs to access the data securely.
Which solution will meet these requirements?

Answer options

Correct answer: A

Explanation

Option A is correct because it allows the Lambda function to access the Aurora database securely within the same VPC by configuring the correct security group rules. Option B is incorrect as creating a function in a different VPC complicates access and introduces unnecessary latency. Option C fails because it incorrectly sets up two security groups without allowing the necessary traffic from SG1 to SG2. Option D is not suitable since it requires exporting data to S3, which is not necessary for retrieving data directly from the Aurora database.