M Leonard
M Leonard

Reputation: 591

boto3 describe VPC connections - where is the region?

I am looking to create a 'topology' of all my VPC's which are peered. In essence, I have an 'origin' vpc, and from their, I am querying all the peers to see their zones, subnets, peer ids, etc... However, when I query the peered connections, I cannot for the life of me get the region of each 'accepter'! My current method:

connections = (self.client.describe_vpc_peering_connections())["VpcPeeringConnections"]

How do I get the region for these connections?

Upvotes: 0

Views: 949

Answers (1)

liorko
liorko

Reputation: 1674

Try this: connections['VpcPeeringConnections']['RequesterVpcInfo']['Region']

Refernce: EC2 Client documentation

Upvotes: 1

Related Questions