Watch all our Tutorials and Training Videos for Free on our Youtube Channel, Get Online Web Tools for Free on swebtools.com

Search Suggest

AWS VPC - Create Route Tables and Assign Subnets in AWS

create aws vpc route tables, create aws vpc subnets, aws vpc route tables examples, how to create route tables in aws vpc, create route tables in aws
In this post, we will provide you the step by step procedure of how to create route tables and assign subnets in AWS.
Create Route Tables and Assign Subnets in AWS

A route table contains a set of rules, called routes, that are used to determine where network traffic is directed.

Each subnet in your VPC must be associated with a route table; the table controls the routing for the subnet. A subnet can only be associated with one route table at a time, but you can associate multiple subnets with the same route table.

AWS VPC - Create Route Tables and Assign Subnets in AWS

To make you understand better, lets have a sample VPC architecture as shown in below image as our requirement.
sample vpc architecture


  • 1 VPC (10.0.0.0/16)

  • 2 Subnets - Public Subnet (10.0.1.0/24) and Private Subnet (10.0.2.0/24)

  • 1 Internet Gateway attached to Public Subnet.

Already we have created VPC, Internet Gateway and Subnets (Public and Private). Refer the previous post (AWS VPC | Create New VPC, Subnets, Internet Gateway ) where we have covered,

  1. How to create a New VPC?

  2. How to create Internet Gateway and attach to newly created VPC?

  3. How to create Public Subnet and Private Subnet?


In this post, we will cover only,

  1. How to create Route Tables for Public and Private Subnet?

  2. How to edit Route Tables?

  3. How to add Internet Gateway route to Public Route Table?

  4. How to Associate Public and Private Subnets to respective Route Tables?


Note : In order to create and manage any AWS Services, we must have some valid users created with IAM policy defined. Else you wont have a access to these AWS services.

Login into AWS Management Console.

I have created my VPC in US East (N. Virginia) region, So, make sure you are in the right region.

aws regions

Go to "Services", type "VPC" in the search box and select the VPC from the search result.

aws vpc services

How to create Route Tables for Public and Private Subnet?

Go to "Route Tables" section from the left side panel.

Create Public Route Table:

By default, one route table is created and attached to VPC. Let's modify the tag name, attach the Internet Gateway to this route table and add the public subnet to it.

Select the route table, pull down "actions" button and select "Add/Edit tags".

aws route table name modify

Click "Create Tag".

aws route table name create tag

Enter the Key "Name" and Value "Public RT".

aws route table modify tag

Go to "Routes" section and click "Edit routes".

aws route table edit routes

Click "Add Route" and Enter the Destination and Target your VPC as below and "Save Routes".

aws route table add internet gateway

Again select the "Public RT" route table and go to "Subnet Associations".

aws route table subnet associations

Click "Edit Subnet Associations", mark only the correct "Public Subnet" which we have created and click "Save".

aws route table add subnet association

Create Private Route Table:

Now click "Create Route Table".

aws create private route table

Enter the name and attach the VPC.

aws create route table

Select the Private Route Table now and go to Subnet Association section. Click "Edit Subnet Associations".

aws route table private subnet association

Mark the correct private subnet this time and click save.


aws route table private subnet configuration


That's it for this post, hope you have got an idea on the below topics.

  1. How to create Route Tables for Public and Private Subnet?

  2. How to edit Route Tables?

  3. How to add Internet Gateway route to Public Route Table?

  4. How to Associate Public and Private Subnets to respective Route Tables?

Refer the previous post (AWS VPC | Create New VPC, Subnets, Internet Gateway ) where we have covered,

  1. How to create a New VPC?

  2. How to create Internet Gateway and attach to newly created VPC?

  3. How to create Public Subnet and Private Subnet?


To protect the AWS resources in each subnet, We can use multiple layers of security, including security groups and network access control lists (ACL).

Also Request you to go through the below recommended tutorial, if you are interested in learning.