An AWS route table is a set of rules that tells a Virtual Private Cloud (VPC) where to forward network traffic based on its destination IP address.
For example, when an EC2 instance sends a request, AWS needs to determine whether that request should stay inside the VPC, travel to the public internet, or pass through another network connection.
Route tables make that decision.
But this raises several questions:
Why does every subnet need a route table?
What does
10.0.0.0/16 → localmean?Why do we use
0.0.0.0/0for internet access?How does AWS choose between multiple matching routes?
Why can't a private EC2 instance access the internet directly?
What happens when the route table is incorrect?
In this guide, we'll answer these questions with simple explanations, tables, and real-world networking scenarios.
No AWS account or deployment is required. We'll focus on understanding how routing actually works.
1. Before AWS: What Is Routing?
Imagine you want to travel from Dhaka to Chattogram.
You know your destination, but you still need to determine which road to follow.
A road map helps you choose a path.
Computer networking works in a similar way.
When one device sends data to another device, the data is divided into smaller units called packets.
An IP packet contains important information, including:
Source IP address: Where the packet comes from.
Destination IP address: Where the packet needs to go.
Other information required to deliver and process the packet.
Suppose your laptop sends a request to a server.
The packet may contain:
Field | Example |
|---|---|
Source IP |
|
Destination IP |
|
Purpose | Communicate with an external service |
A router examines the destination IP address and uses its routing information to determine where the packet should go next.
This process is called routing.
Routing vs. IP addressing
These two concepts solve different problems.
IP addressing identifies network locations.
Routing determines how packets travel toward those locations.
Think about a postal delivery.
The delivery address identifies the destination. The transport network determines how the parcel reaches it.
Having an address doesn't automatically mean there is a valid route to that address.
This distinction is essential for understanding AWS networking.
2. Where Do Route Tables Fit Inside an AWS VPC?
Before discussing route tables, let's establish a simple network.
Suppose we create an AWS VPC with this CIDR block:
10.0.0.0/16
Inside it, we create three subnets.
Subnet | CIDR | Purpose |
|---|---|---|
Public Subnet |
| Web server |
Private Subnet |
| Backend API |
Isolated Subnet |
| PostgreSQL database |
Each subnet has an independent address range within the VPC.
For example:
Web server:
10.0.1.10Backend API:
10.0.2.20Database:
10.0.3.30
All three resources belong to the same VPC, but that does not mean they need identical connections to other networks.
The web server may need direct internet access.
The backend might need outbound internet access without accepting incoming connections.
The database may only need to communicate with the backend.
This is why we use different route tables.
Does every subnet need a route table?
Yes.
In Amazon VPC, every subnet is associated with a route table.
A route table contains rules describing where traffic from that subnet should be forwarded.
A subnet can be associated with only one subnet route table at a time.
However, multiple subnets can share the same route table.
Important: A VPC doesn't have to use only one route table
A single VPC can contain several route tables.
For example:
Public Route Table
Private Route Table
Isolated Route Table
Each can specify different destinations and targets.
This gives us control over traffic routing for different types of workloads.
If VPCs, CIDR blocks, and subnets are still unfamiliar, read AWS VPC Explained for Beginners: Subnets, CIDR, Routing, and Gateways before continuing.
3. What Is an AWS Route Table?
An AWS route table is a collection of routing rules inside a VPC.
Each rule tells AWS:
If a packet is going to this destination, forward it to this target.
Let's look at a simple example.
Destination | Target |
|---|---|
| local |
| Internet Gateway |
This route table contains two routes.
But what do the columns actually mean?
Destination
The destination identifies the IP address range that a route applies to.
For example:
10.0.0.0/16
This represents every IPv4 address between:
10.0.0.0 and 10.0.255.255
If a packet's destination falls within this range, the route can match it.
Another example:
0.0.0.0/0
This matches every IPv4 destination.
We'll explain why it is called the default route shortly.
Target
The target identifies where AWS should forward the matching traffic.
Depending on the network architecture, a target can be:
local— the VPC's local routing.Internet Gateway — an internet connection for the VPC.
NAT Gateway — commonly used for outbound traffic from private workloads.
VPC Peering Connection — a connection to another VPC.
Transit Gateway — a central routing hub connecting networks.
Gateway VPC Endpoint — a private route to supported AWS services.
For now, focus on the first three.
They are enough to understand most beginner networking scenarios.
What does a route table actually decide?
Suppose our web server wants to send packets to two destinations.
Destination A: 10.0.2.20
This address belongs to the VPC.
The packet uses the local route.
Destination B: 8.8.8.8
This address is outside the VPC's 10.0.0.0/16 range.
The packet matches the default route and is forwarded toward the Internet Gateway.
The route table doesn't need to know whether the packet is a website request, an API call, or a software update.
Its primary routing decision is based on the destination address.
4. Understanding the Local Route
Let's start with the most important route:
10.0.0.0/16 → local
When you create a VPC using 10.0.0.0/16, AWS automatically adds a local route for this CIDR block to its route tables.
This route supports communication within the VPC.
Example: Two EC2 instances in different subnets
Suppose:
Web Server:
10.0.1.10
Backend API:
10.0.2.20
Both addresses belong to:
10.0.0.0/16
Now the web server wants to call the API.
The destination is:
10.0.2.20
AWS checks the web server subnet's route table.
It finds:
Destination | Target |
|---|---|
| local |
Because 10.0.2.20 belongs to 10.0.0.0/16, this route matches.
AWS uses local VPC routing to reach the destination.
The request does not need an Internet Gateway or NAT Gateway.
What if the servers are in different subnets?
They can still communicate locally because both subnets are part of the same VPC.
You do not normally need to create separate routes like:
10.0.1.0/24 → local
10.0.2.0/24 → local
10.0.3.0/24 → local
The existing route:
10.0.0.0/16 → local
already covers all three ranges.
This is an important beginner concept.
The local route covers the VPC CIDR block, not just the particular subnet associated with the route table.
Does local routing mean all traffic is allowed?
No.
Routing and network permissions are separate.
A packet may have a valid local route but still be blocked by Security Groups or Network ACLs.
For example, if the API server doesn't allow TCP port 3000 from the web server, the request can fail even though both servers have a valid local network route.
5. What Does 0.0.0.0/0 Mean?
This is probably the most frequently misunderstood part of AWS routing.
Consider:
0.0.0.0/0
It is called the default IPv4 route destination.
The /0 means zero bits are fixed as the network prefix.
Therefore, the block matches every possible IPv4 address.
Its range is:
0.0.0.0 to 255.255.255.255
But there's an important detail.
Although the default route matches all IPv4 addresses, AWS doesn't necessarily use it for every packet.
Why?
Because AWS prefers more specific matching routes.
We'll examine that rule next.
Example: A public subnet route table
Destination | Target |
|---|---|
| local |
| Internet Gateway |
Think of these rules as instructions:
Rule 1: If the destination belongs to 10.0.0.0/16, use local routing.
Rule 2: For other IPv4 destinations that don't match a more specific route, use the Internet Gateway.
For example:
Destination IP | Selected Target |
|---|---|
| local |
| local |
| Internet Gateway |
| Internet Gateway |
The default route provides a fallback path for IPv4 destinations not covered by more specific entries.
Does 0.0.0.0/0 mean everyone can access the server?
No.
This is a common confusion because 0.0.0.0/0 is also used in Security Group rules.
The meaning depends on where it appears.
In a route table:
0.0.0.0/0 identifies a destination range and the route's target determines where matching packets are forwarded.
In an inbound Security Group rule:
0.0.0.0/0 means any IPv4 source can match that rule, subject to the specified protocol and ports.
The CIDR notation is the same, but the purpose is different.
A route does not automatically allow incoming connections.
6. How Does AWS Choose Between Multiple Matching Routes?
Now let's explore how AWS decides which route to use.
Suppose a route table contains these entries:
Destination | Target |
|---|---|
| local |
| VPC Peering Connection |
| Internet Gateway |
A VPC peering connection allows two VPCs to communicate privately when the network configuration supports it.
Imagine an EC2 instance sends a packet to:
172.31.5.10
Which route does AWS use?
Let's examine the possibilities.
Route 1: 10.0.0.0/16
Does 172.31.5.10 belong to the 10.0.0.0/16 range?
No.
Therefore, this route doesn't match.
Route 2: 172.31.0.0/16
Does 172.31.5.10 belong to this range?
Yes.
Route 3: 0.0.0.0/0
Does this route also match?
Yes, because it matches all IPv4 addresses.
Now two routes match.
Which one wins?
The more specific route:
172.31.0.0/16
Therefore, AWS forwards the traffic through the VPC Peering Connection.
This behavior is called the longest prefix match.
7. What Is the Longest Prefix Match?
The longest prefix match means:
When multiple routes match a destination IP, AWS generally chooses the route with the longest matching prefix.
A longer CIDR prefix represents a more specific address range.
Let's compare:
CIDR | Address Range Size | Specificity |
|---|---|---|
| 4,294,967,296 | Least specific |
| 16,777,216 | More specific |
| 65,536 | More specific |
| 256 | Even more specific |
| 1 | Most specific IPv4 address |
Now imagine a destination IP:
10.0.2.50
And consider these hypothetical matching route entries:
Destination | Target |
|---|---|
| Target A |
| Target B |
| Target C |
All three CIDR blocks include 10.0.2.50.
But /24 is more specific than /16 and /0.
Therefore, Target C wins in this conceptual routing example.
In Amazon VPC, adding a route more specific than the local route is subject to restrictions. AWS supports certain appliance-routing scenarios, but you cannot freely redirect local traffic to any target type. The example above illustrates prefix matching, not an unrestricted configuration.
Is this the same as Network ACL rule priority?
No.
Network ACLs evaluate numbered rules in ascending order and stop at the first match.
VPC route tables generally choose the most specific matching destination route.
The displayed row order is not the priority system.
For routes with equally specific destinations, AWS has additional precedence rules for static, prefix-list, and propagated routes.
See How AWS route priority works.
A simple way to remember
If you have:
One instruction for the entire city.
Another instruction for a particular neighborhood.
A third instruction for a specific building.
When delivering to that building, the most specific applicable instruction usually wins.
That's the basic idea behind the longest prefix match.
8. Main Route Table vs. Custom Route Table
When you create a VPC, AWS automatically creates a main route table.
This is the default route table for subnets that do not have an explicit association with another route table.
What does the main route table contain?
For a VPC created without additional networking resources, the main route table normally contains a local route.
Example:
Destination | Target |
|---|---|
| local |
This allows communication within the VPC's CIDR block, subject to security rules.
It does not provide a default route to the public internet.
The exact initial configuration can differ if you use AWS's VPC creation workflows to create gateways and other networking resources automatically.
What is a custom route table?
A custom route table is one you create to control traffic for particular subnets.
For example, you might create:
public-route-table
with:
Destination | Target |
|---|---|
| local |
| Internet Gateway |
And another route table:
private-route-table
with:
Destination | Target |
|---|---|
| local |
| NAT Gateway |
These route tables are associated with different subnets.
What happens if we don't associate a custom route table?
The subnet uses the VPC's main route table implicitly.
This is an important troubleshooting detail.
You may create a custom route table containing the correct Internet Gateway route, but if the intended subnet is not associated with it, the subnet won't use that custom table.
Creating a route table and associating a subnet with it are two separate actions.
9. How Public Subnet Routing Works
Let's examine public internet access.
Our public subnet is:
10.0.1.0/24
A web server in that subnet has:
Private IP: 10.0.1.10
It also has an associated public IPv4 address.
Its subnet route table contains:
Destination | Target |
|---|---|
| local |
| Internet Gateway |
Scenario: The web server calls an external API
Suppose the EC2 instance makes an HTTPS request to an internet service with destination IP:
8.8.8.8
We're using this address only to illustrate routing, not claiming a particular API runs there.
AWS examines the destination.
Does it match 10.0.0.0/16?
No.
Does it match 0.0.0.0/0?
Yes.
Therefore, the packet follows the route toward the Internet Gateway.
The Internet Gateway provides the necessary public/private IPv4 translation for an instance with a public IPv4 address.
The external service can then return a response through the appropriate network path.
Scenario: An internet user opens the website
Now consider incoming traffic.
A visitor connects to the web server's public IPv4 endpoint using HTTPS.
The Internet Gateway handles the public-to-private address mapping, and AWS delivers the traffic toward the destination resource.
The connection also depends on:
The correct internet-connected architecture.
Security Group inbound permissions.
Applicable Network ACL rules.
A web server listening on the correct port.
A valid route is necessary for connectivity, but it is not sufficient on its own.
Does a public subnet mean every instance is accessible from the internet?
No.
An EC2 instance can be in a public subnet without having a public IPv4 address.
In that case, an Internet Gateway route alone does not give the instance direct IPv4 internet connectivity.
For a standard EC2 direct internet connection over IPv4, the instance also needs a public IPv4 address or Elastic IP.
For a more detailed explanation, see AWS EC2 Networking Explained: Private IP, Public IP, Elastic IP, and Security Groups.
10. How Private Subnet Routing Works
Now imagine we have a backend API server.
Private IP:
10.0.2.20
Subnet:
10.0.2.0/24
We don't want the server to accept arbitrary incoming internet connections.
But sometimes it needs outbound internet access.
For example, it may need to:
Download application dependencies.
Retrieve operating system updates.
Call an external payment API.
Send a request to a third-party notification service.
How can it do these things without a public IPv4 address?
One common solution is a public NAT Gateway.
Example private subnet route table
Destination | Target |
|---|---|
| local |
| NAT Gateway |
The route table now handles two different types of traffic.
Internal traffic
If the backend connects to:
10.0.3.30
The destination belongs to the VPC.
The local route is selected.
External traffic
If the backend connects to an external public IPv4 address, that destination usually matches the default route.
The packet is forwarded toward the NAT Gateway.
What happens after the NAT Gateway receives the packet?
In a conventional zonal public NAT Gateway design, the gateway is placed in a public subnet.
The public NAT Gateway performs address translation and forwards outbound traffic through the Internet Gateway.
Conceptually, the path is:
Private EC2 → Public NAT Gateway → Internet Gateway → External Service
Responses return through the established NAT connection.
The private EC2 instance does not need its own public IPv4 address.
Importantly, the public NAT Gateway does not allow arbitrary unsolicited incoming internet connections to that private EC2 instance.
AWS also offers regional NAT Gateway capabilities, but the routing principle remains that the private subnet needs a suitable route to the NAT service.
Why not point the private route table directly to an Internet Gateway?
Because a private EC2 instance with only a private IPv4 address cannot obtain direct public IPv4 internet access merely by adding an Internet Gateway route.
Direct IPv4 communication through an Internet Gateway requires suitable public IPv4 addressing.
A public NAT Gateway solves the outbound connectivity problem without requiring a public IPv4 address on the private instance.
11. How an Isolated Subnet Works
Not every resource needs internet access.
Consider a PostgreSQL database.
Private IP:
10.0.3.30
Subnet:
10.0.3.0/24
The database only needs to communicate with an authorized backend API inside the VPC.
Its route table might contain only:
Destination | Target |
|---|---|
| local |
There is no default route to an Internet Gateway or NAT Gateway.
What can the database communicate with?
It can communicate with permitted destinations inside the VPC's local address range.
For example:
10.0.2.20
This is the private API server.
Because that address falls within 10.0.0.0/16, it matches the local route.
The database Security Group still needs to permit the intended traffic.
What if the database tries to reach 8.8.8.8?
The local route does not match.
There is no default route and no other applicable route.
Therefore, the subnet route table provides no forwarding path for that destination.
The outbound internet connection cannot succeed through that routing configuration.
This is a useful design when a workload has no requirement to communicate with the public internet.
However, a subnet without an internet route is not automatically secure against all threats. Internal access control, application security, credentials, and other protections remain important.
12. A Complete Example: How Different Packets Travel
Let's combine the concepts into one VPC.
Network architecture
Resource | Address |
|---|---|
VPC |
|
Public subnet |
|
Private subnet |
|
Isolated subnet |
|
Web server |
|
API server |
|
Database |
|
The public subnet has a default route to an Internet Gateway.
The private subnet has a default route to a public NAT Gateway.
The isolated subnet has only its local route.
Assume Security Groups, Network ACLs, and any other required network settings permit the intended traffic.
Scenario A: Web server requests data from the API
Source:
10.0.1.10
Destination:
10.0.2.20
The packet originates in the public subnet.
Its route table contains:
10.0.0.0/16 → local
Because the API address belongs to the VPC, AWS uses the local route.
Selected path: Local VPC routing
The Internet Gateway is not required for this internal connection.
Scenario B: API connects to PostgreSQL
Source:
10.0.2.20
Destination:
10.0.3.30
The packet originates in the private subnet.
The destination is inside the same VPC.
Selected path: Local VPC routing
The NAT Gateway is not required for the database connection.
Scenario C: API calls an external service
Source:
10.0.2.20
Destination:
An external public IPv4 address.
The destination does not match the VPC CIDR.
The default route is:
0.0.0.0/0 → NAT Gateway
Selected path: NAT Gateway, then the internet path
Scenario D: Web server calls an external service
Source:
10.0.1.10
Destination:
An external public IPv4 address.
The public subnet's default route points to the Internet Gateway.
Assuming the instance has appropriate public IPv4 addressing:
Selected path: Internet Gateway
Scenario E: Database attempts direct internet access
Source:
10.0.3.30
Destination:
An external public IPv4 address.
The isolated subnet has no matching default route.
Result: No internet route
Scenario summary
Source | Destination | Routing Result |
|---|---|---|
Web Server | API Server | local |
API Server | PostgreSQL | local |
API Server | Public internet | NAT Gateway |
Web Server | Public internet | Internet Gateway |
Database | Public internet | No matching route |
This example demonstrates that resources in the same VPC can have different connectivity based on their subnet route tables.
13. Does a Route Table Control Incoming and Outgoing Traffic?
This question is particularly important because routing and firewall rules are often confused.
A subnet route table primarily tells the VPC how to forward packets originating from resources in that subnet toward their destinations.
For example, if an EC2 instance in the public subnet initiates an HTTPS request, the route table determines the next routing target for that request.
Traffic arriving from another network must also have a valid path through the relevant gateways and VPC routing components.
But route tables are not firewalls.
They don't use inbound and outbound allow/deny rules in the same way as Security Groups or Network ACLs.
Route Table vs. Security Group vs. Network ACL
Component | Main Question |
|---|---|
Route Table | Where should this packet go? |
Security Group | Is this connection permitted for the resource? |
Network ACL | Is this traffic allowed across the subnet boundary? |
Imagine sending a parcel to a secure office.
The route table is like the delivery directions.
The Security Group is like the office's access-control system.
The Network ACL is like an additional checkpoint at the department boundary.
Even if the delivery route is correct, security controls may prevent access.
What about return traffic?
Return traffic also needs a valid network path.
For example, in a VPC peering connection, both VPCs generally need appropriate routes for communication in both directions.
Security Group statefulness can automatically permit response traffic for a tracked connection, but it cannot create a missing network route.
Similarly, Network ACLs may need explicit directional rules for both requests and responses.
A connection succeeds only when its required network paths and security permissions work together.
14. What Happens When a Route Is Missing or Incorrect?
A missing or incorrect route can make a perfectly healthy application appear broken.
Let's look at several examples.
Problem 1: EC2 has a public IP but cannot access the internet
Suppose:
The EC2 instance has a public IPv4 address.
The VPC has an Internet Gateway.
The application is running.
But the subnet route table contains only:
10.0.0.0/16 → local
There is no route to the Internet Gateway.
Why does connectivity fail?
The subnet has no suitable route for external IPv4 destinations.
The presence of a public IPv4 address does not automatically create the missing route.
Problem 2: A private EC2 instance cannot download software updates
The private subnet route table contains only:
10.0.0.0/16 → local
The EC2 instance tries to reach an external package repository.
The destination is outside the VPC.
No route matches.
Why does connectivity fail?
The subnet has no outbound route to an appropriate network target.
If the workload requires outbound public IPv4 access, a properly configured NAT-based path is one possible solution.
Problem 3: The route exists, but the subnet isn't using it
You create a route table containing:
0.0.0.0/0 → Internet Gateway
However, the EC2 instance's subnet remains associated with another route table containing only a local route.
The new Internet Gateway route isn't being used by that subnet.
Lesson: Always verify the actual route table associated with the source subnet.
Problem 4: A route points to a deleted or unavailable resource
Suppose a route points to a NAT Gateway or another target that is no longer available.
The route may enter a blackhole state.
Even though the destination and target still appear in the route table, the target cannot forward traffic.
Lesson: A route's existence does not guarantee the target is operational.
Problem 5: A more specific route sends traffic somewhere unexpected
Suppose a route table has a default internet route and a more specific route to another network.
Traffic matching the more specific CIDR follows that route rather than the default.
This is expected behavior, but it can be surprising when someone only checks the default route.
Lesson: Inspect all applicable routes, not just 0.0.0.0/0.
Problem 6: The route is correct, but Security Groups block the connection
Imagine the API server and database belong to the same VPC.
Local routing is correct.
But the database's Security Group doesn't allow PostgreSQL connections from the API.
The request fails.
Lesson: Route tables choose paths; Security Groups control permitted connections.
15. What Is a VPC Peering Route?
So far, we've focused on traffic inside one VPC and traffic to the internet.
But what if two separate VPCs need to communicate privately?
For example:
VPC A:
10.0.0.0/16
VPC B:
172.31.0.0/16
We can use a VPC peering connection, subject to AWS's peering requirements.
The route table in VPC A might contain:
Destination | Target |
|---|---|
| local |
| VPC Peering Connection |
The route table in VPC B might contain:
Destination | Target |
|---|---|
| local |
| VPC Peering Connection |
Now each VPC has a route toward the other.
This is called bidirectional routing.
A peering connection does not automatically create all required routes and security permissions for communicating workloads.
You still need the relevant route and security configurations.
This is an example of why route tables aren't limited to Internet Gateways and NAT Gateways.
They are also important when connecting private networks.
16. What Are VPC Endpoint Routes?
Suppose an EC2 instance in a private subnet needs to access Amazon S3.
One option would be to use a suitable outbound internet path.
However, AWS also supports gateway VPC endpoints for Amazon S3 and DynamoDB.
A gateway endpoint can provide a private route from a VPC to the supported service without requiring an Internet Gateway or NAT Gateway for that traffic.
How does this appear in a route table?
An example might look like:
Destination | Target |
|---|---|
| local |
| Gateway VPC Endpoint |
| NAT Gateway |
Here, pl-example represents an illustrative AWS-managed prefix list identifier.
A prefix list identifies a collection of IP address ranges.
For example, an AWS-managed prefix list can represent the addresses associated with an AWS service.
Packets whose destination matches the S3 prefix list can follow the gateway endpoint route rather than the general default route to the NAT Gateway.
This can reduce unnecessary use of NAT infrastructure for supported services, depending on the application and architecture.
Gateway VPC endpoints also have endpoint-policy, routing, and service-specific considerations.
You don't need to understand all of them yet.
The important point is that route tables can send different destinations through different network paths, even when those packets originate from the same subnet.
17. What About IPv6 Route Tables?
Everything we've discussed so far has mainly focused on IPv4.
AWS also supports IPv6 networking.
IPv6 uses 128-bit addresses instead of 32-bit IPv4 addresses.
In an IPv6-enabled VPC, route tables can include IPv6 routes.
The IPv6 default route is:
::/0
This is conceptually similar to IPv4's:
0.0.0.0/0
Both represent a default destination for their respective address families.
However, they do not match each other's traffic.
Example IPv6 routing
Destination | Target |
|---|---|
VPC IPv6 CIDR | local |
| Internet Gateway |
For outbound-only IPv6 internet connectivity, AWS also provides an egress-only Internet Gateway.
A private IPv6 subnet can use a route such as:
::/0 → Egress-only Internet Gateway
This allows resources to initiate outbound IPv6 connections while preventing unsolicited incoming connections through that gateway.
IPv6 addressing and gateway behavior differ from IPv4, so we should not assume IPv4 NAT rules apply directly to IPv6.
For beginners, the important principle remains:
IPv4 and IPv6 routes are evaluated independently, and each address family needs its own suitable routing configuration.
18. A Simple Mental Model for Reading Any AWS Route Table
When you encounter an unfamiliar AWS route table, ask these questions.
Question 1: Which subnet is associated with this route table?
This tells you which resources normally use the table for traffic originating from that subnet.
Question 2: What is the VPC's local route?
For example:
10.0.0.0/16 → local
This describes ordinary routing within the VPC's address range.
Question 3: Does it have a default route?
Look for:
0.0.0.0/0
Or, for IPv6:
::/0
Then identify the target.
Question 4: Where does the default route point?
For IPv4:
Internet Gateway → potentially direct public internet connectivity.
Public NAT Gateway → outbound internet connectivity for private resources.
No default route → no general route to external IPv4 destinations.
Other routing targets and more specific routes may also exist.
Question 5: Are there more specific routes?
For example:
172.31.0.0/16 → VPC Peering Connection
Such a route may take priority over 0.0.0.0/0 for matching traffic.
Question 6: Are the targets available and correctly configured?
A route to a deleted or unavailable target does not provide working connectivity.
Question 7: Do the security rules and return path permit the connection?
Even correct routing cannot override blocked security rules or an unavailable destination service.
These seven questions provide a useful way to understand route tables without memorizing a large number of AWS commands.
19. Common AWS Route Table Misunderstandings
“Every subnet must have its own separate route table.”
Not necessarily.
Each subnet uses one route table, but multiple subnets can share the same table.
“0.0.0.0/0 always sends all traffic to the internet.”
No.
It matches all IPv4 destinations, but more specific matching routes take precedence.
Its target also doesn't have to be an Internet Gateway.
“A public subnet gives every EC2 instance a public IP.”
No.
The subnet's public status comes from its Internet Gateway route.
Public IPv4 address assignment is a separate configuration.
“If two EC2 instances are in different subnets, they need an Internet Gateway to communicate.”
No.
If they belong to the same VPC and use ordinary local VPC routing, they can communicate using private IP addresses.
Security controls must still allow the connection.
“A private subnet cannot access the internet.”
Not always.
A private subnet can use an appropriate outbound path, such as a public NAT Gateway for IPv4 traffic.
“A route table determines whether a packet is allowed.”
A route table determines the packet's forwarding path.
Security Groups and Network ACLs control network traffic permissions.
“AWS uses the first route in the table.”
No.
AWS generally uses the longest prefix match, with additional route-precedence rules when required.
“A route table guarantees that packets will reach their destination.”
No.
The target may be unavailable, security rules may block traffic, the return path may be missing, or the destination service may not be listening.
Routing is one part of a complete network connection.
20. Frequently Asked Questions
What is the main purpose of a route table in AWS?
A route table specifies how traffic from an associated subnet or gateway is forwarded to different network destinations.
What does local mean in an AWS route table?
It identifies the local VPC routing target for an associated VPC CIDR block.
In ordinary VPC networking, this allows private communication between resources inside the VPC.
Why does AWS automatically add a local route?
It establishes routing for communication within the VPC's address space.
What does 0.0.0.0/0 mean?
It is the IPv4 default destination, matching all IPv4 addresses.
AWS uses it when no more specific matching route takes precedence.
What is the difference between an Internet Gateway route and a NAT Gateway route?
An Internet Gateway route is used for internet-connected VPC traffic. For standard direct IPv4 internet communication, an EC2 instance needs suitable public IPv4 addressing.
A route to a public NAT Gateway is commonly used to give private resources outbound IPv4 internet connectivity without assigning them public IPv4 addresses.
Can a route table have more than one default IPv4 route?
A single subnet route table normally has one route for a particular 0.0.0.0/0 destination. You cannot create two ordinary active routes with the same destination simply to select two different default targets.
You can create additional, more specific routes to other targets.
What happens if no route matches the destination?
There is no usable forwarding path for that destination through the route table, so the packet cannot reach it through that routing configuration.
Can I change the local route?
AWS supports advanced configurations that replace a local route's target or add certain more specific routes for network appliances.
However, these features have restrictions and are not needed for ordinary beginner VPC architectures.
Are route tables free in AWS?
Ordinary VPC route tables do not have a separate hourly resource charge.
However, traffic routed through services such as NAT Gateways, Transit Gateways, and other billable networking resources may incur charges.
How can I troubleshoot routing problems?
Check the subnet's route table association, destination CIDRs, selected targets, target availability, and security rules.
AWS Reachability Analyzer can help evaluate network reachability based on your AWS resource configuration.
It performs static configuration analysis rather than sending live application packets, so a successful reachability analysis does not guarantee that the application itself is healthy.
See Troubleshoot VPC reachability issues.
Conclusion
AWS route tables are essential because they determine how packets move within a VPC and toward connected networks.
The most important concepts to understand are:
Destination: The IP range that a route matches.
Target: The network component that receives matching traffic.
Local route: The ordinary routing path for communication within the VPC.
Default route: The fallback route for destinations without a more specific match.
Longest prefix match: The principle that generally selects the most specific matching route.
Subnet association: The relationship that determines which route table a subnet uses.
Once you understand these concepts, public subnet routing, private subnet routing, NAT Gateways, Internet Gateways, and VPC peering become easier to reason about.
And remember:
A valid IP address tells you where a packet should go. A route table determines its network path. Security controls determine whether the communication is permitted.
Understanding the differences between these responsibilities is one of the most useful foundations for designing, deploying, and troubleshooting applications on AWS.