Routing Tables in AWS

154 views Asked by At

Whats the difference between Explicit subnet associations and Subnets without explicit associations to route tables in AWS?

I read the documentation but didnt understand, can someone give me an example of whats the difference between this two types?

1

There are 1 answers

0
jarmod On BEST ANSWER

First of all, every subnet must have a route table association (otherwise VPC would not know how to route traffic).

If you don't explicitly associate a route table with a given subnet, then that subnet is automatically associated with the VPC's main route table.

So, you could, for example, have:

  • a VPC with a main route table and 2 other route tables (3 total) and two subnets each associated with a non-main route table (in this case no subnets are associated with the main route table)
  • a VPC with a main route table and no other route tables (1 total) and two subnets, neither of which has an explicit route table association (in this case both subnets are associated with the main route table)

Think of the main route table like a default route table. If you don't explicitly associate a subnet with a given route table then it's implicitly associated, by default, with the main route table.

See subnet route tables.