Reputation: 1355
I want to setup API gateway services in two regions for HA. The primary is in east1. On health check failure it sould route to east 2.
Followed this article (below) to setup the same.
1) setup my api services in both east 1 & east 2 2) both apis are created as regional(not cloud front) 3) created two certificates in each region with single custom domain name say api-ha-example.com. Mapped to with each of its reginal certificate(ACM) 4) The custom domains are created in each region 5) two cname records exsits now in R53 with same name "api-ha-example.com" and, value of each regional API end point. Show here.
1)api-ha-example.com ---> https://xxxxx.execute-api.us-east-1.amazonaws.com/initdev ----> Primary
2)api-ha-example.com ---> https://xxxxx.execute-api.us-east-2.amazonaws.com/initdev ----> secondary
Health check is set to 200 status for primary for now
The problem ----------- I am able to hit the indivisual API enpoints directly. But when i hit with the domain name https://api-ha-example.com/ I dont get anything. site cant be reached. ping test says, cant reolve the domain to server.Anything missing in my settings? Followed the steps as per blog
https://aws.amazon.com/blogs/compute/building-a-multi-region-serverless-application-with-amazon-api-gateway-and-aws-lambda/
Anyone faced this issue?
Upvotes: 0
Views: 2667
Reputation: 179124
You have configured this in DNS:
api-ha-example.com CNAME https://xxxxx.execute-api.us-east-1.amazonaws.com/initdev ;; primary
api-ha-example.com CNAME https://xxxxx.execute-api.us-east-2.amazonaws.com/initdev ;; secondary
DNS CNAME records are hostnames, only -- they have no support for either schemes or paths, so the https://
at the beginning and /initdev
at the end of the CNAME records need to be removed.
Upvotes: 2