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.

已提問 4 年前檢視次數 897 次
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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南