VPC ROUTING LAB · CLF-01

Fix a 504 Missing Internet Gateway Route in an Interactive AWS VPC Simulator

One of the most common AWS outages — and a guaranteed question on both CLF-C02 and SAA-C03 — happens when an EC2 instance has a Public IPv4 address and the VPC has an attached Internet Gateway, yet HTTP traffic still drops with a 504 timeout. The missing link is the subnet Route Table.

Fix This Broken Route Live (15s Challenge) → Read VPC Route Table Cheatsheet

Public Subnet Definition

In AWS, a subnet is only "public" if its associated Route Table contains a default route 0.0.0.0/0 pointing to an Internet Gateway (igw-*).

Longest-Prefix Match

AWS always evaluates the most specific CIDR route first (e.g., 10.0.0.0/16 -> local) before falling back to 0.0.0.0/0.

Live Visual Drop Feedback

CloudTracer animates the exact packet drop at the Internet Gateway and turns green the instant you add 0.0.0.0/0 -> igw.

Checklist: 4 Requirements for Public EC2 Internet Reachability

Step / DimensionComponentTechnical Behavior
1. IGW AttachedVPC PerimeterAn Internet Gateway must be created and attached to the VPC.
2. Default RoutePublic Route TableThe subnet Route Table must include Destination 0.0.0.0/0 -> Target igw-xxxx.
3. Public IPv4EC2 ENIThe EC2 instance must have an auto-assigned Public IPv4 or an Elastic IP (EIP).
4. Firewall RulesSG & NACLSecurity Group allows inbound TCP:80/443; NACL allows inbound 80/443 and outbound ephemeral 1024-65535.

Terraform Fix for Missing Public Subnet IGW Route

resource "aws_route" "public_internet_access" {
  route_table_id         = aws_route_table.public.id
  destination_cidr_block = "0.0.0.0/0"
  gateway_id             = aws_internet_gateway.main.id
}

Frequently Asked Questions

Why can I not reach my EC2 instance even though it has a Public IP?

A Public IP alone is not enough. Your subnet must also be associated with a Route Table containing 0.0.0.0/0 -> igw, and both the Security Group and Network ACL must permit the traffic.

Does attaching an Internet Gateway automatically make subnets public?

No. Attaching an IGW to a VPC only makes the gateway available. Subnets stay private until their associated Route Table explicitly routes 0.0.0.0/0 to that IGW.

Can I practice fixing this route interactively?

Yes — open https://cloudtracer.app/?challenge=clf-01 to watch the TCP:80 packet drop in real time, add the 0.0.0.0/0 -> igw route, and validate the fix in under 15 seconds.

More Interactive AWS Architecture Guides