How to create a route table using Boto3

0 votes

Hi Guys,

I have created a VPC with the help of the boto3 module. I want to create a routing table so that I can associate it with the VPC. How can I do that?

Oct 10, 2020 in AWS by akhtar
• 38,240 points
997 views

1 answer to this question.

0 votes

Hi@akhtar,

You can create a Route Table in the VPC using the create_route_table() method, and then create a new route which will be attached to the internet gateway you created earlier, to establish a public route. 

# create a route table and a public route
routetable = vpc.create_route_table()
route = routetable.create_route(DestinationCidrBlock='0.0.0.0/0', GatewayId=internetgateway.id)
answered Oct 10, 2020 by MD
• 95,380 points

Related Questions In AWS

0 votes
1 answer

How to create subnets in a vpc using boto3?

Here is the simple way of implementing ...READ MORE

answered Dec 5, 2018 in AWS by Shuvodip Ghosh
3,150 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,100 points
209 views
0 votes
1 answer

How to create a DynamoDB table using Python?

The code that you can use to ...READ MORE

answered Feb 22, 2019 in AWS by Priyaj
• 58,100 points
6,901 views
0 votes
1 answer

How to create a DynamoDB table using Java SDK?

The code to create a table in ...READ MORE

answered Feb 23, 2019 in AWS by Priyaj
• 58,100 points
1,765 views
0 votes
1 answer
0 votes
1 answer

How can I return XML from boto calls?

I don't think there's an officially supported ...READ MORE

answered Jul 20, 2018 in AWS by Cloud gunner
• 4,660 points
901 views
0 votes
1 answer

How to create a VPC in AWS using Boto3?

Hi@akhtar, Amazon Web Services enables you to create ...READ MORE

answered Oct 9, 2020 in AWS by MD
• 95,380 points
898 views
0 votes
1 answer

How to download a file from S3 buckets using boto3?

Hi@akhtar, Boto3 supports upload_file() and download_file() APIs to ...READ MORE

answered Oct 8, 2020 in AWS by MD
• 95,380 points
6,910 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