How Do You Use Python and Boto3 to List VPC Route Tables?

Problem scenario
You want to list the Route Tables in your AWS account (under VPC). You are using Python and Boto3. What should you do?

Solution
Run this program with Python 3:

import boto3
ec2 = boto3.client('ec2')
rts = ec2.describe_route_tables()
print(rts)

Leave a comment

Your email address will not be published. Required fields are marked *