1

I am trying to add a simple HTTP to HTTPS redirect using AWS Application Load Balancer but it seems that all tutorials are out to date:

https://aws.amazon.com/premiumsupport/knowledge-center/elb-redirect-http-to-https-using-alb/ https://docs.amazonaws.cn/en_us/elasticbeanstalk/latest/dg/configuring-https-elb.html

I didn't see any option to add Rules under the load balance console, I also checked for this option on AWS CDK and haven't find anything.

The Load Balancer was created by an Elastic Beanstalk app, so I assume that it's an Application Load Balance.

I've seen a lot of tutorials and remind myself of doing same thing last year but now I don't see any option to set rules/redirects using the new AWS Console.

Redirecting EC2 Elastic Load Balancer from HTTP to HTTPS

This is the only option I am seeing available at the console under listener sections:

enter image description here

Lucas Santos
  • 2,991
  • 3
  • 19
  • 29

2 Answers2

2

The Load Balancer was created by an Elastic Beanstalk app, so I assume that it's an Application Load Balance

Actually, it's a Classic load balancer. You can tell because the listener config specifies the load balancer point and the instance port. For an Application load balancer, the instance configuration is part of the target group.

Parsifal
  • 3,928
  • 5
  • 9
1

So, turns out that ELB allows setting Load balance type only at the creation time. In my case, I created my stack as a single instance and add a load balance latter, so AWS automatically sets the default load balancer as the CLASSIC one instead of the application load balance (where we can use targets, rules, etc).

So I had to recreate my environment setting the correct load balancer type.

Lucas Santos
  • 2,991
  • 3
  • 19
  • 29