I have a flask web app that I'm starting on port 80. I have a health check endpoint at /.
The flask app is inside a docker container with port 443 exposed.
I also have an ALB listening on
- port 80 redirecting to port 443
- port 443 with a SSL certificate I obtained from Amazon Certificate Manager after purchasing a domain name on Route53 and forwarding to my TargetGroup.
The SSL certificate is marked as "Issued" and "In Use".
The ALB's security group allows inbound and outbound traffic only on ports 80 (http) and 443 (https).
My Fargate cluster has an active service and the load balancer is in the TargetGroup and belongs to the same security group described above. The container port is 443.
I have one task associated with my service, and it is running.
At this point, I'm having trouble getting any response from my load balancer, which I've been trying to access through my browser. My registered domain name is also not responding, but I suspect it is because the load balancer isn't responding, so that's what I'm focusing on in this question.
I wasn't sure where to begin, so I used
nmap -p80 my-alb-xxxxxx.my-region.elb.amazonaws.com
But that tells me 0 hosts are up. I get the same result using port 443.
My understanding (help) is that my load balancer will accept traffic on 80 and 443, reroute to 443, which is the port my docker container exposes, and will reach my webapp running on 80.
This leads to the following questions:
- Does my flask app need to know about the https handshake or ssl certificate?
- Is my idea of exposing port 443 in my docker container connected to the outbound rule of my security group associated with the load balancer?
- What else can I do to debug why my load balancer dnsname (my-alb-xxxxxx.my-region.elb.amazonaws.com) doesn't respond.