Internet not accessible in the private subnet instance (NAT Gateway)
While working with a private instance, we face various issues in terms of an EC2 instance connecting to the internet or any other instance in the subnet.
How to do it...
- The first troubleshooting step starts with pinging the destination (any other host or internet).
Note
Make sure that you test the destination from another server or your own computer because the destination host/website should have ICMP enabled.
- Verify that NAT Gateway and EC2 are attached to the desired subnet.
- Ensure that NAT Gateway has been created in a public subnet.
Note
Public subnet should have a public Route Table having a default route pointing to the Internet Gateway.
- Check that the NAT Gateway is in an
available
state. If the NAT Gateway goes into afailed
state, you will need to resolve the issue or create a new one immediately.
Note
A failed NAT Gateway will be deleted automatically at some time, usually in an hour.
- Make sure you don't have any blocked...