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 Answer
0
Accepted Answer

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
answered 5 months ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions