Skip to content

Instantly share code, notes, and snippets.

@FredLackeyOfficial
Created August 6, 2022 10:45
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 FredLackeyOfficial/9b2109a921ba21df2b753ccca3021c76 to your computer and use it in GitHub Desktop.
Save FredLackeyOfficial/9b2109a921ba21df2b753ccca3021c76 to your computer and use it in GitHub Desktop.
AWS CLI syntax to update all Route 53 domains with the same contact
# Step 1 of 2: Export Contact Info
export CONTACT_INFO="FirstName=Fred,LastName=Lackey,ContactType=PERSON,AddressLine1=PO Box 6066,City=Live Oak,State=FL,CountryCode=US,ZipCode=32060,PhoneNumber=+1.4073743733,Email=fred.lackey@gmail.com"
# Step 2 of 2: Run command
aws route53domains list-domains --profile fredlackey | jq -r '.Domains' | jq -r '.[].DomainName' | while read DOMAIN; do \
eval "aws route53domains update-domain-contact --profile fredlackey --domain $DOMAIN --admin-contact \"$CONTACT_INFO\" --registrant-contact \"$CONTACT_INFO\" --tech-contact \"$CONTACT_INFO\""; sleep 10;
done;
# Format for the contact info blob:
# FirstName=string,LastName=string,ContactType=string,OrganizationName=string,AddressLine1=string,AddressLine2=string,City=string,State=string,CountryCode=string,ZipCode=string,PhoneNumber=string,Email=string,Fax=string,ExtraParams=[{Name=string,Value=string},{Name=string,Value=string}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment