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 年前

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

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

回答問題指南