2
votes

I've deployed an AWS Gateway in eu-west-1 using regional mode which works fine directly using the generated hostname.

To enable a Custom Domain Name, I've created a certificate in us-east as per the note in the Custom Domain Name portal on the console:

To use your own domain name for an API and Stage, create a Custom Domain Name backed by an ACM certificate. Add Base Path Mappings to map a URL to an API and Stage. You can leave the path empty to use the root (no additional mappings will be allowed) and you can leave the Stage empty to specify it in the URL (e.g. www.example.com/my-base-path/MyStage). To use an ACM certificate with API Gateway, you must request or import the certificate in the US East (N. Virginia) region.

I've then created a Custom Domain Name and a CNAME record using the endpoint given in the Custom Domain Name portal.

When I then try to connect using my hostname, my browser correctly resolves the CNAME but I get Invalid certificate chain error. The certificate returned is in fact for *.execute-api.eu-west-1.amazonaws.com.

This worked fine when I was using edge-based deployments.

1

1 Answers

2
votes

Ignore the message in the console that the certificate needs to be deployed in us-east. That's only applicable for Edge based deployments.

For regional deployments, you must create the certificate via ACM in each region you're deploying to.