I have a Flask application running on ECS behind an application load balancer. My website successfully delivers content over HTTP. It does not deliver content over HTTPS. All of those requests result in 502 Bad Gateway
errors.
- The ECS cluster passes health checks.
- My health checks leverage port
443
. - My ALB has two listeners: one that redirects from
80
to443
, and one that uses HTTPS protocol over port 443 and is linked to an AWS ACM certificate. - My AWS ACM certificate is DNS-verified for the domain.
- My security groups attached to the load balancer listeners allow inbound traffic from the internet on port
80
and443
. - My ECS cluster itself has security groups that allow it to make outbound requests on
443
. - My application load balancer logs show
request_processing_time
,target_processing_time
, andresponse_processing_time
of-1
. - My application load balancer logs show an
elb_status_code
of502
, and atarget_status_code
of-
. Per AWS, this indicates a load balancer issue.
Why do all requests to my website result in 502 Bad Gateway
errors?