Last active
September 13, 2023 13:45
-
-
Save cliffano/41c9eb97c06e5ca7fab64f6413f743a4 to your computer and use it in GitHub Desktop.
List all Route53 records across all hosted zones using multiple AWS profiles.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
AWS_PROFILES="profile1 profile2" | |
for aws_profile in ${AWS_PROFILES}; do | |
export AWS_PROFILE=${aws_profile} | |
for zone in `aws route53 list-hosted-zones | jq -r '.HostedZones[].Id'`; do | |
aws route53 list-resource-record-sets --hosted-zone-id $zone | | |
jq -r '.ResourceRecordSets[]? | "\(.Name),\(.Type),\(.ResourceRecords[]?.Value)"'; | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment