APIGateway certificate error

0

Hi, I have the following setup. api.mydomain.com (Route53) -> API GW Rest API instance as an HTTP proxy -> ELB DNS Name -> ECS

I can convert the Rest API to an HTTP API if required.

When I make a call to the api.mydomain.com I get the following error through the Cloudwatch console: Execution failed due to configuration error: Host name '<ELB_DNS_NAME>' does not match the certificate subject provided by the peer (CN=mydomain.com)

What is the root cause of it in detail and what is the best way to solve the problem? Is my approach correct?

Any help appreciated, thanks.

2개 답변
0
수락된 답변

I would recommend reading this document and its sub-sections thoroughly to ensure you have configured the custom domain for the API Gateway REST API correctly - https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html

Also is the ELB for ECS a public or private endpoint. If it is public, you should be good, but if it is private you will need to configure a VPCLink and a Network Load Balancer in front of the ALB for ECS - https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-private-integration.html

profile pictureAWS
전문가
답변함 2년 전
0

Thanks for the answer. I got your point.

ELB for ECS is private. Just one thing I dont get; what do I need to create an NLB in front of ALB. Is it not possible to connect API to ALB directly?

And I am deploying all of this with CDK. I could not find how to put an NLB in front of ALB. Can you lead me to correct location of a sample implementation or documentation?

Thanks.

답변함 2년 전

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

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

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