-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Haiko edited this page Jan 8, 2018
·
2 revisions
For a regional API, use the AWS CLI to create an ALIAS record set in the Route 53 hosted zone. See AWS Doc for more info. Important is to differentiate two different HostedIds: the one from your hosted zone in Route 53 and the Hosted Zone Id from the Region.
aws route53 change-resource-record-sets
--hosted-zone-id {your-hosted-zone-id} --> use your hosted zone from Route 53
--change-batch file://path/to/your/setup-dns-record.json
{
"Changes": [
{
"Action": "CREATE",
"ResourceRecordSet": {
"Name": "regional.example.com",
"Type": "A",
"AliasTarget": {
"DNSName": "d-numh1z56v6.execute-api.us-west-2.amazonaws.com",
"HostedZoneId": "Z2OJLYMUO9EFXC", //--> regional hosted zone id, see also [AWS Doc](https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region)
"EvaluateTargetHealth": false
}
}
}
]
}