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,180 points
342 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,220 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
2,074 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,120 points
102 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,120 points
5,605 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
• 58,120 points
1,080 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
574 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,220 points
373 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, 2020 in AWS by MD
• 95,220 points
3,211 views