CloudFront for HTTP API Gateway with disabled default endpoint

1

I have a CloudFront distribution with WAF to protect an HTTP API Gateway. CloudFront distribution has an Alternate domain name api.mysite.dev which we manage with CloudFlare (CNAME record points to https://{distro}.cloudfront.net). Distributions Origin is an HTTP API Gateway default endpoint. We use a build-in Auth0 authorizer on API so we cannot use a custom lambda authorizer.

Now I want to higher the security and disable the default API endpoint. I created a Custom domain name for the API with an ACM certificate in the same region and disabled the default endpoint. Instead of the default endpoint, I specified the API's custom domain name as an Origin for CloudFront distribution - (apigw.mysite.dev which is pointing to API Gateway domain name d-123abc123.execute-api.{my-region}.amazonaws.com).

But CloudFront responds with 404 Not Found error when calling the api.mysite.dev as if CF couldn't reach the origin custom domain name. CloudFront logs doesn't bring any valuable info.

I've reviewed the documentation and followed carefully the steps in knowledge center.

Can anyone provide any tips on to how to fix the issue? Can I use a HTTP API with custom domain managed externally (and ACM certificate) as a origin for CloudFront?

1 回答
0

Any update about this ?

rodkot
已回答 4 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则