Create a custom route table
Hello Everyone
Welcome to CloudAffaire and this is Debjeet
In the last blog post, we have created a private subnet inside our VPC and hosted one EC2 instance in it.
https://cloudaffaire.com/create-a-private-subnet/
In this blog post, we are going to create a new private subnet and a custom route table. We will also explicitly associate this new subnet with our custom route table. Below is the configuration diagram for this demo.
We are going to create our new private subnet using 10.0.2.0/24 IPv4 CIDR.
Create a custom route table:
Step 1: Login to AWS console and navigate to ‘VPC’.
Step 2: Click ‘Create subnet’ located under ‘Subnets’.
Step 3: Provide your subnet name, VPC and IPv4 CIDR block. Click ‘Create’.
Note: You can also choose the availability zone for your subnet.
One success message will be displayed, click ‘Close’.
We have successfully created a private subnet.
Next, we are going to create a custom route table.
Step 4: Navigate to ‘Route Tables’ and click ‘Create route table’.
Step 5: Provide name and VPC for your route table and click ‘Create’.
One success message will be displayed, click ‘Close’.
Our new custom route table has been created successfully.
Next, we are going to explicitly associate the new subnet (subnet 2) with this custom route table.
Step 6: Click ‘Edit subnet associations’ located under ‘Subnet Associations’.
Step 7: Select the subnet that you want to associate and click ‘Save’.
Your new private subnet (subnet 2) has been successfully associated with the custom route table.
Cleanup: Navigate to ‘Your VPCs’, select your VPC and from action click ‘Delete’.
Note: We will use this same VPC and existing configuration in upcoming blogs, hence if you wish to continue then don’t delete your VPC.
In the next blog post, we are going to prepare our VPC for internet connection.
To get more details on VPC, please refer below AWS documentation
https://docs.aws.amazon.com/vpc/index.html