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, 2019 in AWS by Disha
1,303 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, 2019 by Priyaj
• 58,020 points
Can you explain this in the console?
Thank you priyaj, nicely explained.

Related Questions In AWS

0 votes
1 answer

How to get the number of pages in a pdf file present in s3?

Hi@Manav, To know about information about pdf file, ...READ MORE

answered May 3, 2020 in AWS by MD
• 95,460 points
3,196 views
0 votes
1 answer
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, 2019 in AWS by Priyaj
• 58,020 points
733 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, 2019 in AWS by Priyaj
• 58,020 points
625 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP