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 in AWS by akhtar
• 33,410 points
53 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 by MD
• 79,270 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 4, 2018 in AWS by Shuvodip Ghosh
1,693 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
65 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
• 57,700 points
4,459 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 22, 2019 in AWS by Priyaj
• 57,700 points
777 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,650 points
402 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 in AWS by MD
• 79,270 points
55 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 7 in AWS by MD
• 79,270 points
148 views