- Newest
- Most votes
- Most comments
You can check why the 502 is the failing which should be one of the following conditions:
SSL/TLS negotiation failure between CloudFront and a custom origin server Origin is not responding with supported ciphers/protocols SSL/TLS certificate on the origin is expired, invalid, self-signed, or the certificate chain is in the wrong order: Origin is not responding on specified ports in origin settings
Reference : https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-502-bad-gateway.html
I would first configure the ELB as Origin in the Cloudfront and route the request to see everything is working and then emulate the Origin request using lambda using the below Event structure for Origin request : https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html#example-origin-request
Relevant content
- Accepted Answerasked a year ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 months ago