Skip to content

Instantly share code, notes, and snippets.

@arashilmg
Forked from tcbyrd/README.md
Last active January 28, 2020 10:44
Show Gist options
  • Save arashilmg/81c3c725a0976de4a3d810134c2cc7a4 to your computer and use it in GitHub Desktop.
Save arashilmg/81c3c725a0976de4a3d810134c2cc7a4 to your computer and use it in GitHub Desktop.
Route53 CNAME Update
### 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\"}]}}]}" ```
{
"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