AWS CloudFront 502: cause and troubleshooting
The CloudFront origin returned an invalid or incomplete response, or CloudFront could not complete its connection to the origin.
What to check next
Inspect origin logs, verify the origin protocol and TLS certificate, and confirm the response is valid HTTP with headers that meet CloudFront limits.
Use the diagnostic code and provider headers as clues, then confirm the request against origin logs and deployment telemetry. A status code can be generated by a proxy, load balancer, function platform, or origin application; the same number does not always have the same cause across providers.
Keep a CDN error from becoming a long outage
Record the request identifier, timestamp, affected hostname, and deployment when investigating an intermittent failure. SteadyNode checks public endpoints on a schedule and translates recognized upstream errors into concise diagnostic context, helping teams identify whether a failure is at the edge or origin.

