How to edit the route of a Route Table attached to a subnet?

0 votes
Can someone help me with the command to create new route for a route table attached to a subnet?
Feb 21 in AWS by Disha
44 views

1 answer to this question.

0 votes

To create a route in a route table that is attached to a VPC you must have the route table id and the internet gateway (if you want to give public access) the CIDR block.

The command used for doing that is as follows:-

C:\Users\priyj_kumar>aws ec2 create-route --route-table-id rtb-05f48298823c9731d --destination-cidr-block 0.0.0.0/0 --gateway-id igw-0185c098195ba1d1a

This will return true if the route was created successfully.

{
    "Return": true
}

This way you can create a route to allow all traffic. Hope this helps.

answered Feb 21 by Priyaj
• 56,520 points
Can you explain this in the console?
Thank you priyaj, nicely explained.

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,520 points
790 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to associate a route table to a subnet?

To associate a route table to a ...READ MORE

answered Feb 21 in AWS by Priyaj
• 56,520 points
12 views
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,520 points
25 views