Skip to content

Instantly share code, notes, and snippets.

@jamesbjackson
Forked from porjo/dump_route53_records.md
Last active August 14, 2020 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesbjackson/5b99835c8e56dbe8c2c1752ffe941721 to your computer and use it in GitHub Desktop.
Save jamesbjackson/5b99835c8e56dbe8c2c1752ffe941721 to your computer and use it in GitHub Desktop.
Export route53 records to TSV & CSV

Retrieve hosted zones with aws route53 list-hosted-zones then enter the zone Id below:

TSV

aws route53 list-resource-record-sets --hosted-zone-id "/hostedzone/xxxxxxxxxxx" | jq -r '.ResourceRecordSets[] | [.Name, .Type, (.ResourceRecords[]? | .Value), .AliasTarget.DNSName?]  | @tsv'

CSV

aws route53 list-resource-record-sets --hosted-zone-id "/hostedzone/xxxxxxxxxxx" | jq -r '.ResourceRecordSets[] | [.Name, .Type, (.ResourceRecords[]? | .Value), .AliasTarget.DNSName?]  | @csv'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment