Skip to content

Instantly share code, notes, and snippets.

@thedoc31
Created August 13, 2024 20:59
Show Gist options
  • Save thedoc31/96b8b40a21e111379513132e11b7d5f6 to your computer and use it in GitHub Desktop.
Save thedoc31/96b8b40a21e111379513132e11b7d5f6 to your computer and use it in GitHub Desktop.
Search all AWS zones in an account for a particular value
Need to obtain a list of all valid zone IDs for the account first. Can run from CLI or CloudShell
while read zone || [[ -n $zone ]]; do echo $zone && aws route53 list-resource-record-sets --hosted-zone-id $zone --query "ResourceRecordSets[?ResourceRecords[?Value == '<your_value>']"; done <your_zone_list.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment