
Answer-first summary for fast verification
Answer: Route private subnet outbound traffic through a NAT gateway.
The correct answer is C. When a Lambda function is configured to connect to a private subnet within a VPC, it loses direct internet access. In this scenario, to allow the Lambda function to access public APIs, the outbound traffic from the private subnet must be routed through a NAT (Network Address Translation) gateway. A NAT gateway is necessary because it enables instances in a private subnet to connect to the internet or other AWS services while preventing the internet from initiating a connection with those instances.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A developer encounters connectivity issues with an updated AWS Lambda function configured in a private VPC subnet, unable to access public APIs despite the APIs being accessible and an internet gateway attached to the VPC. How can the developer resolve this issue?
A
Verify network ACLs permit outbound internet traffic.
B
Check security group rules for outbound internet traffic.
C
Route private subnet outbound traffic through a NAT gateway.
D
Direct private subnet outbound traffic to an internet gateway.