How to associate a route table to a subnet?

0 votes
Can someone help me with the command to associate a route table to a subnet?
Feb 21 in AWS by Disha
20 views

1 answer to this question.

0 votes

To associate a route table to a subnet all you need to have is your route table id and the subnet id.

The command used for doing that is as follows:

C:\Users\priyj_kumar>aws ec2 associate-route-table --route-table-id rtb-05f48298823c9731d --subnet-id subnet-08f4ee13b627d22bb

This will give you an Association ID.

{
    "AssociationId": "rtbassoc-0ff5de96aa63ef405"
}

This way you can attach a route table to a subnet explicitly. 

answered Feb 21 by Priyaj
• 56,900 points

Related Questions In AWS

+2 votes
2 answers

How do we move a domain from Hostgator to AWS Route 53?

I found this  Before transferring a domain, make ...READ MORE

answered Aug 3, 2018 in AWS by Priyaj
• 56,900 points
984 views
0 votes
2 answers

How to skip headers when reading a CSV file in S3 and creating a table in AWS Athena?

Thanks for the answer. This should be clear ...READ MORE

answered Aug 14 in AWS by athenauserz
1,263 views
0 votes
1 answer

How to make a subnet public using AWS Console?

To make a subnet public you need ...READ MORE

answered Feb 11 in AWS by Priyaj
• 56,900 points
51 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to create a route table for a VPC?

To create a Route Table for your ...READ MORE

answered Feb 21 in AWS by Priyaj
• 56,900 points
29 views