Route 53 Alias To API Gateway Not Routing Traffic

0

Hi everyone,

I recently followed multiple tutorials from both AWS and Youtube to make sure I set up everything correctly. To summarize - I've set up a custom domain name for an api in API Gateway, and I've also configured some Cloudwatch Logs so I know when a request hits the Api. My Route53 has the correct record (using A-Alias type) to route api.mywebsite.com to the API Gateway domain name as seen in the API Gateway console. However, when I try to see if api.mywebsite.com resolves correctly, it does not. In addition, it does not log anything to Cloudwatch, suggesting that it's not even routing traffic.

Things I've tried -

  1. adding different routes to the API Gateway configuration.
  2. modifying the custom domain name mapping to have an empty path so that api.mywebsite.com by itself is accepted by API Gateway, theoretically.
  3. changing the ACM certificate used by the custom domain to match the name of api.mywebsite.com, character for character.
  4. adding a $default route in API Gateway that will accept any path.

I feel like I'm reaching the end of my rope here. I apologize in advance if these forums are not the best place for such questions.

2개 답변
1

I feel very silly - it turns out that in my computer browser typing in api.mywebsite.com directed to http://api.mywebsite.com, which failed, as compared to my mobile browser, which directed it to https://api.mywebsite.com, which worked.

Closing this thread

답변함 4년 전
0

Another interesting thing is that my mobile browser successfully hits the backend through api.mywebsite.com, but on my desktop Chrome and Firefox hitting api.mywebsite.com fails.

답변함 4년 전

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

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

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

관련 콘텐츠