I need the end-to-end encryption, so current the setup is:
example.com -> Route53 -> LB (TCP :80/443) -> Nginx Ingress with SSL certs installed
Is it possible to do something like:
example.com -> Route53 -> CloudFront -> LB (TCP :80/443) -> Nginx Ingress with SSL certs installed
When I'm attaching the same certificate to CloudFront, I'm getting a 502 CloudFront error. I listed example.com
in Alternate Domain Names and LB DNS name mylb123.elb.us-east-2.amazonaws.com
as Origin Domain Name. Documentation says that Origin Domain Name should match one of the names in SSL certificate that is assigned to the origin, but the SSL was provisioned for real domains like example.com
, for sure it does not include *.elb.us-east-2.amazonaws.com
etc. This confuses me.
Can you please suggest on how to setup SSL on CloudFormation side or passthrough it and handle SSL on Ingress side?
Update:
The SSL certificate is issued by DigiCert, it's not self-signed.
*.elb.us-east-2.amazonaws.com
to that certificated is a good option, isn't it? - jumpyDigiCert
cert for*.elb.us-east-2.amazonaws.com
because this domain is not yours. You need to have your own domain. I don't understand how you could register a cert for AWS-owned domain? Whatever you did, such cert is invalid. - Marcinexample.com
, but when I use it for CloudFront it raises502
error. The problem was in SSL handshakes falling between CloudFront and Nginx instance. I had to whitelist theHost
header so CloudFront can forward it to the origin, see me answer below. Thanks for your support anyway! - jumpy