I want to create the next schema: client—HTTPS (aws load balancer)—fargate container runninng HTTP traffic. I want to terminate HTTPS session with load balancer istead of having expensive SSL certificates in docker container.It is possible for some redirection with aws to handle HTTPS traffic via Internet but in container service to listen for pure HTTP?
I have tried cert bot but for me it is not the right decision.
The schema I need to implement is this: client – HTTPS – elb—HTTP – fargate
I rose a ticket to the aws support and they proposed :
Navigated to the EC2 console > Select Load Balancer > Listeners > Add Listener > Choose protocol HTTPS and port 443; in Default actions, Add Action, Redirect To "#{protocol}" and Port 80, leave remaining configuration as it is.
Next, on the same page, in Default SSL certificate, choose the SSL certificate that I created for the Route53 domain.
Saved!
Navigated to the ECS console, ensured that the container defined in Task Definition is running on Port 80.
Next, created a Cluster, created a Service in the same VPC in which my Application Load Balancer resides.
While configuring the Service, I selected my ALB, and in the 'Container to Load Balance' section, I added the following configurations:
Production Listener Port 443:HTTPS
Production Listener Protocol HTTPS
Target Group Name - Create New
Target Group Protocol - HTTP (Since our Fargate container is listening on Port 80)
Path Pattern /
Evaluation order 1
HealthCheck Path /
Created the Service.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With