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
128 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
• 57,700 points
Can you explain this in the console?
Thank you priyaj, nicely explained.

Related Questions In AWS

0 votes
1 answer
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
• 57,700 points
75 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
• 57,700 points
63 views