-
-
Save arashilmg/81c3c725a0976de4a3d810134c2cc7a4 to your computer and use it in GitHub Desktop.
Route53 CNAME Update
This file contains 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
### AWS CLI command to update CNAME | |
SOMEHOSTNAME="something.com | |
aws route53 change-resource-record-sets --hosted-zone-id `aws route53 list-hosted-zones-by-name --dns-name "bizcover.io" --max-items 1 --query HostedZones[0].Id ` --change-batch "{\"Changes\":[{\"Action\":\"UPSERT\",\"ResourceRecordSet\":{\"Name\":\"terraform.bizcover.io\",\"Type\":\"CNAME\",\"TTL\":30,\"ResourceRecords\":[{\"Value\":\"$SOMEHOSTNAME\"}]}}]}" ``` |
This file contains 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
{ | |
"Changes": [ | |
{ | |
"Action": "UPSERT", | |
"ResourceRecordSet": { | |
"Name": "terraform.bizcover.io", | |
"Type": "CNAME", | |
"TTL": 30, | |
"ResourceRecords": [ | |
{ | |
"Value": "something.com" | |
} | |
] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment