Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #AWS Hints, Tips & Tricks
  2.  
  3. ## How to get Route53 HostedZone Id for apex domain name
  4. ```shell
  5. sudo apt install -y jq # sudo yum install -y jq
  6. apex=google-moogle.com
  7.  
  8. hostedZoneIdRaw=`aws route53 list-hosted-zones-by-name --dns-name $apex. --max-item 1 | jq '.HostedZones[0].Id'`
  9. hostedZoneId=`expr substr $hostedZoneIdRaw 14 14`
  10.  
  11. echo hostedZoneIdRaw # "/hostedzone/ZJDLDUSDHDLDJ"
  12. echo hostedZoneId # ZJDLDUSDHDLDJ
  13. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement