Created
October 4, 2018 16:56
-
-
Save colehocking/f4b7dfb35c4622a00c9ce9a76ee4adfd to your computer and use it in GitHub Desktop.
Get AWS Domain Expiration Date
This file contains hidden or 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 | |
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