Regional custom domain name on Edge API Gateway API

0

Hi,

I would like to setup the following:

  1. Route53 latency-based routing to API in API Gateway
  2. Route53 health check for the latency records to automatically failover
  3. API Gateway with Lambdas in 2 regions
  4. Lambdas are hosted in private VPCs with NAT Gateways in 2 AZs in each region

For the API Gateway, I want to use an EDGE endpoint because the latency is considerably less than with REGIONAL. I was able to set this up, but then I need to use REGIONAL custom domain names since EDGE custom domain names are global and the same domain name cannot be used in 2 different regions.

Will this work correctly or is this problematic? Is there any drawback/issue to mixing REGIONAL custom domain names with EDGE APIs? Is there a better/recommended way to set this up?

Thanks!

1개 답변
0
수락된 답변

According to Amazon Q:

Yes, you can create a regional custom domain linked to an edge REST API in API Gateway.

To do so:

  1. Request or import an SSL/TLS certificate for the domain from AWS Certificate Manager (ACM). The certificate must be requested/imported in the same region as your API.

  2. Create the custom domain name for your edge REST API in API Gateway. Select the ACM certificate created in step 1.

  3. Create a DNS record (e.g. CNAME) to route traffic from your custom domain to the API's edge hostname.

  4. Test your API by making requests using the custom domain name. Traffic will be routed through CloudFront to the edge API endpoint.

The key difference between regional and edge custom domains is that edge domains use CloudFront for routing, while regional domains route directly to the regional API endpoint.

Refer to the API Gateway documentation for more details on setting up custom domains for REST and other API types. Let me know if you have any other questions!

Sources

[1] [Setting up a regional custom domain name in API Gateway - Amazon API Gateway] (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html)

[2] [How can I set up a custom domain name for my API Gateway API?] (https://repost.aws/knowledge-center/custom-domain-name-amazon-api-gateway)

Nochum
답변함 5달 전
profile picture
전문가
검토됨 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인