AWS Certified SysOps Administrator – Associate — Question 280

A company has an application that uses a scheduled AWS Lambda function to retrieve datasets from external sources over the internet. The function is not associated with a VPC. The company is modifying the application to store the information that the Lambda function retrieves on an Amazon RDS DB instance in a private subnet. The VPC has two public subnets and two private subnets.

A SysOps administrator must deploy a solution that allows the Lambda function to access the new database and continue to access the internet.

Which solution meets these requirements?

Answer options

Correct answer: C

Explanation

To allow an AWS Lambda function to access both private VPC resources (like an RDS instance in a private subnet) and the public internet, the Lambda function must be associated with the private subnets. Outbound internet traffic from these private subnets must then be routed through a NAT gateway deployed in a public subnet. Placing Lambda in public subnets directly does not grant it internet access because Lambda functions do not get assigned public IP addresses, and routing private subnets directly to an Internet Gateway is invalid.