简体   繁体   中英

Redirect to public ELB from AWS ApiGateway

Im trying to redirect a call from api gateway to a public elb in AWS. The ELB is open to the world but I cannot make it work going by the API Gateway.

API GateWayConfiguration

I get this response from the postman when I call the events operation { "message": "Internal server error" }

And from AWS test console, Im getting this error:

Wed Jan 17 20:29:12 UTC 2018 : Execution failed due to configuration error: Host name 'public-elb.amazonaws.com' does not match the certificate subject provided by the peer (CN=*.confidential.com) Wed Jan 17 20:29:12 UTC 2018 : Method completed with status: 500

I assume that the ELB is reachable because then I change to another random URL, the error code is "Invalid endpoint address".

Why am I getting this error? I only have one certificate and is the same in the url and the elb.

Your error is caused by the SSL certificate having the common name "*.confidential.com" and you are redirecting to a different name "public-elb.amazonaws.com"

The solution is to create an ALIAS (preferred) or CNAME record in DNS that maps your domain name to the ELB dns name. Then use that name in your redirect.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM