API Gateway: Mixing of REST APIs and HTTP APIs on the same domain name can only be accomplished through API Gateway's V2 DomainName interface error

Viewed 1628

I have created a sample API Gateway using "HTTP API".

I then add a custom domain and added the relevant CNAME record to the DNS.

I then go on Configure API mappings, to add the HTTP API but I get the following error message:

Mixing of REST APIs and HTTP APIs on the same domain name can only be accomplished through API Gateway's V2 DomainName interface. Currently, WebSocket APIs can only be attached to a domain name with other WebSocket APIs. This must also occur through API Gateway's V2 DomainName interface.

Note that adding normal "REST API" works fine.

What is the problem exactly and how do I fix it?

Note that I have since deleted all custom domains, and added this domain fresh, and it still does not work..

Error message

1 Answers

I got a second error message and this may explain the reason:
enter image description here

The error message says: "These API types may only be associated to REGIONAL domain names": this means that an HTTP API can only be associated with a REGIONAL custom domain so EDGE is not (hopefully yet) supported with EDGE custom domains.
You only have the option to use a REST API, in order to associate it with an EDGE custom domain, or to create multiple HTTP API deployments in multiple AWS Regions and use Route53 (or you own DNS provider) to map each regional deployment endpoint based on a low-latency strategy.

Related