One of the most common networking issues in AWS occurs when an EC2 instance is correctly configured but remains inaccessible from the internet. Even if the security group, network ACLs, and application are working properly, a missing or detached Internet Gateway can prevent inbound and outbound internet traffic.
In this hands-on lab, the EC2 instance was running inside a public VPC named nautilus-vpc with Nginx already configured to listen on port 80. After verifying that the instance and security group were configured correctly, the root cause was identified as a detached Internet Gateway. Reattaching the Internet Gateway restored internet connectivity, allowing the application to be accessed successfully.
Step 1 – Verify the VPC Configuration
The first step was verifying the networking components associated with the VPC.
The following were checked:
Public VPC
Route Table
Internet Gateway
Security Group
EC2 Public IP
Network ACL
The Security Group and EC2 configuration were already correct.
Step 2 – Identify the Root Cause
During verification, the Internet Gateway named:
xfusion-ig
was found in the Detached state.
Without an attached Internet Gateway:
Internet traffic cannot enter the VPC.
Public IP addresses become unreachable.
Applications remain inaccessible from external users.
This was the root cause of the issue.
Step 3 – Attach the Internet Gateway
The detached Internet Gateway was attached to the nautilus-vpc.
AWS Console Steps:
Open VPC
Navigate to Internet Gateways
Select xfusion-ig
Choose Actions → Attach to VPC
Select nautilus-vpc
Save the configuration
Once attached, the VPC regained internet connectivity.
Step 4 – Verify the Application
After attaching the Internet Gateway, the EC2 instance became publicly reachable.
Opening the EC2 Public IP in a browser displayed the default Nginx Welcome Page, confirming that the application was successfully accessible over HTTP on port 80.
Conclusion
Troubleshooting AWS networking requires checking each component involved in the traffic flow rather than focusing only on the EC2 instance. In this lab, the EC2 instance and Nginx server were functioning correctly, but the VPC lacked an attached Internet Gateway. Reattaching the Internet Gateway restored the network path, making the application publicly accessible.
This exercise reinforces the importance of understanding how VPC components such as Internet Gateways, route tables, subnets, and security groups work together to enable internet connectivity in AWS.