DVA-C02 · Question #147
A developer creates an AWS Lambda function that retrieves and groups data from several public API endpoints. The Lambda function has been updated and configured to connect to the private subnet of a V
The correct answer is C. Ensure that outbound traffic from the private subnet is routed to a public NAT gateway.. When a Lambda function is configured to connect to a VPC, it loses its default internet access. To allow the Lambda function to access the public internet, it must be connected to a private subnet in the VPC that is configured to route its traffic through a NAT Gateway (Network A
Question
A developer creates an AWS Lambda function that retrieves and groups data from several public API endpoints. The Lambda function has been updated and configured to connect to the private subnet of a VPC. An internet gateway is attached to the VPC. The VPC uses the default network ACL and security group configurations. The developer finds that the Lambda function can no longer access the public API. The developer has ensured that the public API is accessible, but the Lambda function cannot connect to the API How should the developer fix the connection issue?
Options
- AEnsure that the network ACL allows outbound traffic to the public internet.
- BEnsure that the security group allows outbound traffic to the public internet.
- CEnsure that outbound traffic from the private subnet is routed to a public NAT gateway.
- DEnsure that outbound traffic from the private subnet is routed to a new internet gateway.
How the community answered
(62 responses)- A3% (2)
- B10% (6)
- C81% (50)
- D6% (4)
Explanation
When a Lambda function is configured to connect to a VPC, it loses its default internet access. To allow the Lambda function to access the public internet, it must be connected to a private subnet in the VPC that is configured to route its traffic through a NAT Gateway (Network Address Translation Gateway). The Internet Gateway is usually used to provide internet access to resources in the public subnet, but for resources in the private subnet, a NAT Gateway is required.
Community Discussion
No community discussion yet for this question.