# AWS Route Tables

> A route table contains the rules that decide where the network traffic of a VPC subnet is sent: the local network, an Internet Gateway, a NAT Gateway and more.

- Source: https://www.itwonderlab.com/aws-route-tables/
- Published: 2026-10-05
- Updated: 2026-10-05
- Author: Javier Ruiz Jiménez (https://www.javierruizjimenez.com/)
- Site: IT Wonder Lab (https://www.itwonderlab.com/)

---

![AWS Route Table](https://www.itwonderlab.com/media/logos/Others/AWS_Route_Table.svg)

A **route table** is a set of rules, called routes, that determine where the network traffic of a [subnet](https://www.itwonderlab.com/aws-subnets/) (or of a gateway) is directed. Every subnet of a [VPC](https://www.itwonderlab.com/aws-vpc/) is associated with one route table.

### Key concepts

- **Local route**: every route table has a route for the CIDR block of the VPC, so all the resources of the VPC can talk to each other. It cannot be deleted.
- **Destination and target**: each route sends a destination (a CIDR block such as `0.0.0.0/0`) to a target: an [Internet Gateway](https://www.itwonderlab.com/aws-internet-gateway/), a [NAT Gateway](https://www.itwonderlab.com/aws-nat-gateway/), a VPC peering connection, a Transit Gateway, a VPN or a VPC endpoint.
- **Most specific route wins** (the longest prefix).
- **Main route table**: the one used by the subnets that are not explicitly associated with another table.
- A subnet is **public** when its route table sends `0.0.0.0/0` to an Internet Gateway, and **private** when it sends it to a NAT Gateway or has no Internet route.

### Pricing

Route tables are free. The gateways and connections that they point to may have a cost.

### With Terraform

The resources are `aws_route_table`, `aws_route`, `aws_route_table_association` and `aws_main_route_table_association`.

See tutorials:

-   [AWS with Terraform: The Essential Guide (8/21) – AWS Routing Tables](https://www.itwonderlab.com/aws-terraform-tutorial-aws-routing-tables/)
-   [AWS with Terraform Tutorial: Terraform Modules (18)](https://www.itwonderlab.com/aws-terraform-tutorial-terraform-modules/)
