0
votes

I am trying to setup a custom domain endpoint for API gateway published endpoint but not able to set.

I've followed all steps

  • Custom domain DNS is managed by AWS (aws cannot own this as its a .ai URL)
  • Created ACM Certificate for subdomain. (subdomain.host.ai)
  • Add Custom API in API Gateway with Mapping to particular Stage
  • Add A record for custom domain to point to "d-abcde12345.execute-api.us-west-2.amazonaws.com"

What might be going wrong.

1
Sorry, don't quite follow question. So your domain resolves but it returns a 404? - Chris Williams

1 Answers

0
votes

When you are pointing to a DNS hostname, rather than an IP, you need a CNAME record. More importantly, when you assign a custom domain to your API Gateway, it will create a CloudFront distribution for you and gives you a CloudFront endpoint: E123CNFSOMETHING.cloudfront.net. You need to create a CNAME record in your registrar dashboard to point to this address, not the API Endpoint:

FROM                        TO                                    TTL
subdomain                   E123CNFSOMETHING.cloudfront.net.      300