Skip to content

Instantly share code, notes, and snippets.

@konstantinj
Created September 19, 2019 07:49
Show Gist options
  • Save konstantinj/4c16c331cd8aecf3e77f7978e2c1b377 to your computer and use it in GitHub Desktop.
Save konstantinj/4c16c331cd8aecf3e77f7978e2c1b377 to your computer and use it in GitHub Desktop.
Export all AWS Route53 Records from all Hosted Zones to CSV files
aws route53 list-hosted-zones | jq -r '.HostedZones[] | .Id + " " + .Name' | xargs -l bash -c 'aws route53 list-resource-record-sets --hosted-zone-id $0 | jq -r ".ResourceRecordSets[] | [.Name, .Type, (.ResourceRecords[]? | .Value), .AliasTarget.DNSName?] | @tsv" > ${1}csv'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment