Created
February 19, 2020 09:40
-
-
Save Efrat19/755b847ab6264e597971cda5a3e49650 to your computer and use it in GitHub Desktop.
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 | |
KEY=dr.newadmin | |
VALUE=a88dd1213cf1811e9803406c5e12f321-536496363.eu-west-1.elb.amazonaws.com | |
HOSTED_ZONE_ID=Z2JG04O2LDY5NZ | |
# Creates route 53 records based on KEY name | |
aws route53 change-resource-record-sets --hosted-zone-id $HOSTED_ZONE_ID --change-batch '{ "Comment": "Testing creating a record set", "Changes": [ { "Action": "CREATE", "ResourceRecordSet": { "Name": "'"$KEY"'.hosted.zone.com", "Type": "CNAME", "TTL": 120, "ResourceRecords": [ { "Value": "'"$VALUE"'" } ] } } ] }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment