Skip to content

Instantly share code, notes, and snippets.

@murarisumit
Created March 17, 2015 06:37
Show Gist options
  • Save murarisumit/56d73cec76d751407eb7 to your computer and use it in GitHub Desktop.
Save murarisumit/56d73cec76d751407eb7 to your computer and use it in GitHub Desktop.
boto_Route53_get-all-Zone-ID
from boto import route53
import os
r53=route53.connect_to_region(region_name='us-east-1')
all_zones = r53.get_all_hosted_zones()
hosted_zones = all_zones['ListHostedZonesResponse']['HostedZones']
for hosted_zone in hosted_zones:
zone_id = hosted_zone['Id']
print os.path.basename(zone_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment