내용으로 건너뛰기

Issues consuming AWS API Gateway API

0

Hi

I have a simple HTTP API created using AWS API Gateway that uses a lambda integration to returns some data.
I have also configured it with a custom DN using route53 (CNAME)

Recently I have been getting the following error when making a call to the endpoint

Error: Hostname/IP does not match certificate's altnames: Host: xxxxxx. is not in the cert's altnames: DNS:*.execute-api.eu-west-2.amazonaws.com

Can anyone help with why this is happening? I have setup a certificate for my custom domain using AWS certificate manager as well so its all AWS services, but for some reason its just stopped working?

Thanks
Andrew

질문됨 6년 전2.6천회 조회
2개 답변
0

I am weirdly getting this issue intermittently, when I make a call to the API in a browser I get the following error:

This server could not prove that it is api.xxxx.co.uk; 
its security certificate is from *.execute-api.eu-west-2.amazonaws.com. 
This may be caused by a misconfiguration or an attacker 
intercepting your connection.

Then it goes away and it works again? HUH? Any ideas?

AWS Support, I am using all your services for this but for some reason there seems to be an issue, can someone please help?

답변함 6년 전
0

Forget it I found someone on stackoverflow with the same problem.

Seems to be down to the route53 record. Instead of a CNAME to the API invoke URL it needs to be an ALIAS A record to the region URL of the API

I have detailed the solution here

https://stackoverflow.com/a/63173982/966911

Problem solved.

답변함 6년 전

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

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