Search code examples
amazon-web-servicesaws-elb

Application ELB forward HTTP to HTTPS


It's quite a common problem but I can't figure out how to solve it and why the Application Load Balancing does not have an option for it.

I've an Application ELB set for the ECS and listening on 80 and 443, now, i would like to forward all the HTTP calls to HTTPS . What's the way? beacuse in the rules the only thing that I can do is to forward to instances. Do I've to deploy a Container just to do the fowarding? Do I need another ELB (network maybe) to forward HTTP to HTTPS?


Solution

  • You cannot forward from HTTP to HTTPS using ALB. For this, you either need to do it using a proxy container or at the Web server in the application container.

    If you are using AWS Cloudfront in front of your web application to cache the content, you can do the redirection there as well.