Alamgir Qazi
Alamgir Qazi

Reputation: 793

Elastic Beanstalk with Classic Load Balancer working with HTTP but not HTTPS

I have set up a load Balancer to my elastic beanstalk app. It has provided a DNS / URL which works on http.

Elastic Beanstalk Load Balancer I have set up my domain on Route 53. I'm trying to make it work with HTTPS for a subdomain app.example.com

I have set up a wildcard certificate using ACM *.example.com.

I have enable HTTPS and port 443 on the loadBalancer. But I can't access it using the domain name https://app.example.com but works with http://app.example.com

enter image description here

In Route 53, I have created an A record with Alias set to the load Balancer DNS Name.

I have gone through tonnes of answers on stackoverflow but nothing worked for me. No idea what I'm missing.

Route 53 Alias record

enter image description here

Upvotes: 0

Views: 241

Answers (2)

Alamgir Qazi
Alamgir Qazi

Reputation: 793

This is what worked for me. Changing Instance Protocol to HTTP in first row and changing Instance Port to 80.

enter image description here

Upvotes: 0

Adiii
Adiii

Reputation: 60084

You do not need to map 443 of the target as the TLS will terminate before sending the request to target.

Map 8080 port of the target to 443 of the load balancer.

Below diagram show SSL/TLS termination work with ALB.

enter image description here

SSL Certificates

To use an HTTPS listener, you must deploy at least one SSL/TLS server certificate on your load balancer. The load balancer uses a server certificate to terminate the front-end connection and then decrypt requests from clients before sending them to the targets.

/application/create-https-listener

enter image description here

Upvotes: 1

Related Questions