An application server running on an Amazon EC2 instance in a private subnet is unable to retrieve software updates from the internet. A SysOps administrator needs to troubleshoot this connectivity issue.
Which of the following configurations are required to resolve this problem? (Select TWO.)
- A NAT gateway deployed and running in a public subnet within the VPCAnswer
- A route in the private subnet's route table that directs 0.0.0.0/0 traffic to the NAT gatewayAnswer
- CA route in the private subnet's route table that directs 0.0.0.0/0 traffic directly to an Internet Gateway
- DAn outbound rule in the private subnet's Network Access Control List (NACL) that blocks ephemeral ports (1024-65535)
- EA Gateway VPC endpoint for the update repository associated only with the public subnet's route table
Answer
The correct configurations are deploying a NAT gateway in a public subnet and adding a route in the private subnet's route table that directs 0.0.0.0/0 traffic to the NAT gateway.
For an EC2 instance in a private subnet to access the internet, outbound traffic must be routed to a NAT gateway located in a public subnet. The NAT gateway performs source network address translation and forwards the traffic to the Internet Gateway. Thus, the solution requires both a NAT gateway in a public subnet and a route directing internet-bound traffic (0.0.0.0/0) to that NAT gateway.
Step-by-Step Solution
Key Concept
NAT Gateway and Routing Configuration for Private Subnets