A developer is troubleshooting an Amazon EC2 instance that has a public IPv4 address but cannot access the internet to download updates. The security groups and network ACLs are configured to allow all outbound traffic. What is the most likely cause of this connectivity failure?
- AThe network ACL is stateful and is automatically blocking the outbound HTTP responses from reaching the instance.
- BThe route table associated with the subnet has a route for 0.0.0.0/0 pointing to a Virtual Private Gateway.
- The route table associated with the subnet does not contain a route for 0.0.0.0/0 pointing to the VPC's Internet Gateway.Answer
- DThe route table associated with the subnet is missing a route for the local VPC CIDR block pointing to the Internet Gateway.
Answer
The route table associated with the subnet does not contain a route for 0.0.0.0/0 pointing to the VPC's Internet Gateway.
For an EC2 instance with a public IP address to access the internet, the subnet in which it is launched must be configured as a public subnet. This requires a route table entry that sends all internet-bound traffic (0.0.0.0/0) to the VPC's attached Internet Gateway.
Step-by-Step Solution
Key Concept
VPC Route Tables and Internet Gateway Routing