Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #AWS Hints, Tips & Tricks
- ## How to get Route53 HostedZone Id for apex domain name
- ```shell
- 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
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement