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

asked 4 years ago1814 views
2 Answers
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?

answered 4 years ago
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.

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions