Skip to content

Instantly share code, notes, and snippets.

@lionslair
Forked from porjo/dump_route53_records.md
Created August 5, 2024 02:46
Show Gist options
  • Save lionslair/e7d9bf2cf9867c71e5c8d08652d89d41 to your computer and use it in GitHub Desktop.
Save lionslair/e7d9bf2cf9867c71e5c8d08652d89d41 to your computer and use it in GitHub Desktop.
Export route53 records to CSV

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

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

lionslair commented Aug 5, 2024

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