Sachin K
Sachin K

Reputation: 435

Unable to get associated vpc from the hosted zones boto

I am trying to get the associated vpc id from the hosted zone but the result set does not show anything indicating a vpc id. Need help.

Upvotes: 1

Views: 221

Answers (1)

helloV
helloV

Reputation: 52375

Remember VPC ID is associated with a private zone only. You can get the VPC ID by using get_hosted_zone:

>>> r53.get_hosted_zone('Z5TB46T21X9X7E')['GetHostedZoneResponse']['VPCs']['VPC']['VPCId']
'vpc-abc12345'

Upvotes: 3

Related Questions