Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Receving 403 forbidden from Custom Domain in AWS Api Gateway

I'm trying to build a serverless app with AWS. My API is working fine, but my custom domain is not. I'm receiving a 403 forbidden answer. This is how it's configured my custom domain:

enter image description here

And then I'm using the Target URL provided by this Custom Domain in Route 53 as CNAME. How can I fix this?

like image 603
Filipe Ferminiano Avatar asked Feb 03 '26 17:02

Filipe Ferminiano


1 Answers

The CNAME should point to the CloudFront endpoint (*.cloudfront.net) rather than the API Gateway endpoint (*.execute-api.[region].amazonaws.com).

The CloudFront endpoint can be found by going to API Gateway -> Custom Domain Names. A CloudFront domain should be listed under "Target Domain Name".

like image 166
Tom Avatar answered Feb 06 '26 06:02

Tom