AWS Route Tables

· 1 min read · AWS

AWS Route Table

A route table is a set of rules, called routes, that determine where the network traffic of a subnet (or of a gateway) is directed. Every subnet of a 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, a 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:

More tutorials that use Route Tables

#AWS #AWS Routing Table #AWS VPC