CloudFront can't reach API Gateway

0

I've got CloudFront configured to hit my backend, but it can't resolve the API Gateway.

CloudFront wasn't able to resolve the origin domain name. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

It works just fine hitting the API Gateway directly.

$ curl https://9cm2clgsng.execute-api.eu-central-1.amazonaws.com/api/test
{"test":"ok"}
2개 답변
0

Hello,

Here is the link to the documentation that discusses the process to connect CF with API gateway. refer to the steps where they mention about configuring CF distribution.

Link- https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-cloudfront-distribution/ -- [1]

profile pictureAWS
지원 엔지니어
답변함 2년 전
0

Hi, @catsclaw.

I was able

% curl https://9cm2clgsng.execute-api.eu-central-1.amazonaws.com/api/test
{"test":"ok"}%                                                                                                                                                                     % curl https://d2hc0o1gg1vepi.cloudfront.net/api/test                    
{"test":"ok"}%     

Please check the settings according to the following.

https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-cloudfront-distribution/?nc1=h_ls

For example, the protocol should be HTTPS only.

Enter image description here

profile picture
전문가
iwasa
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠