Skip to content

Instantly share code, notes, and snippets.

@colehocking
Created October 4, 2018 16:56
Show Gist options
  • Save colehocking/f4b7dfb35c4622a00c9ce9a76ee4adfd to your computer and use it in GitHub Desktop.
Save colehocking/f4b7dfb35c4622a00c9ce9a76ee4adfd to your computer and use it in GitHub Desktop.
Get AWS Domain Expiration Date
#!/bin/bash
declare -a domain_list=( $(aws route53domains list-domains | jq -r .Domains[].DomainName) )
for domain in "${domain_list[@]}"
do
# Returns date in unix timestamp
date_unix=$(aws route53domains get-domain-details --domain-name ${domain} | jq -r .ExpirationDate)
date -r ${date_unix}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment