AWS in 1 Min · Episode 39

AWS route tables explained

Where traffic goes next. Watch the one-minute video, then read the details.

David Gomez1:19 video · 3 min read

"If the firewall allows it, traffic gets through." Not without a route. A firewall, such as a security group or a network ACL, only answers yes or no. A route table answers a different question: where does this traffic go next? If no route matches, the traffic goes nowhere, and no firewall rule will fix that.

What a route table is

A route table is a list of routes that belongs to a VPC. Each route has two parts:

  • a destination: the range of IP addresses the traffic is going to, written as a CIDR block such as 10.0.0.0/16
  • a target: the gateway, network interface or connection to send that traffic through, such as an internet gateway, a NAT gateway or a VPC peering connection

When a resource in a subnet sends a packet, AWS looks at the packet's destination address, finds the matching route in the subnet's table and hands the packet to that route's target.

The local route and the default route

Every route table starts with a local route. Its destination is the VPC's own CIDR block and its target is local. It's the reason every resource in a VPC can reach every other one, across subnets and Availability Zones, without any setup. You can't delete it.

The route you'll add most often is the default route, 0.0.0.0/0, which means "every IPv4 address not matched by something more specific":

  • 0.0.0.0/0 to an internet gateway makes the subnet a public subnet.
  • 0.0.0.0/0 to a NAT gateway gives a private subnet outbound-only internet access.
  • No default route at all means the subnet has no path to the internet.

The most specific route wins

Routes aren't evaluated top to bottom. When more than one route matches, AWS uses the most specific one, the route with the longest prefix. This is called longest prefix match.

Take a table with 10.0.0.0/16 to local, 172.31.0.0/16 to a peering connection and 0.0.0.0/0 to an internet gateway. Traffic to 172.31.5.9 matches both the peering route and the default route. The /16 is more specific than the /0, so it goes through the peering connection. Everything else goes to the internet gateway.

Subnets and the main route table

Each subnet is associated with exactly one route table at a time, while one route table can serve many subnets.

Every VPC comes with a main route table. Any subnet you don't explicitly associate with another table uses the main one automatically. That leads to a classic mistake: adding an internet gateway route to the main table. From then on, every new subnet anyone creates is public by default.

A safer pattern is to leave the main table with only the local route and create custom route tables: one for public subnets and one per Availability Zone for private subnets.

Where AI fits

Tracing a path by hand through route tables, gateways and firewalls is slow and easy to get wrong. Two tools help:

  • Reachability Analyzer checks whether a path exists between two resources by analysing your configuration, without sending any packets, and shows the component that blocks it. AWS builds this kind of analysis on automated reasoning, the mathematical branch of AI.
  • The AWS assistant in the console (formerly Amazon Q Developer in the console) can look up resources you have permission to see and explain them in plain language, so you can ask it about your route tables.

One update worth knowing: the Amazon Q network troubleshooting feature that used to work with Reachability Analyzer was removed in June 2025, according to the Reachability Analyzer documentation.

Quick recap

  • A route is a destination (an address range) plus a target (where to send it).
  • The most specific matching route wins, not the first one in the list.
  • Each subnet uses one route table; keep the main table private.
AWS in 1 Min #39 · 1:19

Need an AWS expert on your team?

I'm David, an AWS expert and fractional cloud consultant. I work alongside your team to run your cloud and infrastructure: architecture, security, cost and day-to-day operations. You get senior AWS experience when you need it, without the cost of a full-time hire.

  • Architecture reviews and a clear plan for what to fix first
  • Security hardening: IAM, networking, audits
  • Lower AWS bills without slowing your team down
  • Hands-on help with AI workloads on AWS