sudo apt install -y jq # sudo yum install -y jq
apex=google-moogle.com
hostedZoneIdRaw=`aws route53 list-hosted-zones-by-name --dns-name $apex. --max-item 1 | jq '.HostedZones[0].Id'`
hostedZoneId=`expr substr $hostedZoneIdRaw 14 14`
echo hostedZoneIdRaw # "/hostedzone/ZJDLDUSDHDLDJ"
echo hostedZoneId # ZJDLDUSDHDLDJ
Last active
April 5, 2017 12:21
-
-
Save paveltimofeev/e1c8755d041bddf39c9a5c6bce128eee to your computer and use it in GitHub Desktop.
AWS Hints & Tricks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment