amazon-web-servicesamazon-ec2httpsamazon-elbtargeting

AWS HTTPS requests not working on EC2 Load Balancer


I have an EC2 instance which is running an NodeJS Web-app and I want to enable HTTPS traffic to my instance. I purchased a domain name from AWS and requested an SSL Certificate.

I have also created a Target group which should redirect the traffic to HTTP port 3000 because my node app is running on port 3000.

enter image description here

I created a Load Balancer which should Listen to the HTTPS traffic and redirect it to the Target group.

enter image description here

It seems to work fine but when I click on the DNS name to see whether it is working or not, I can't connect to the server. Do you know what might be the issue.

enter image description here

I have checked and my EC2 instance has opened HTTPS request, so that should't be the issue.enter image description here


Solution

  • Your screenshot shows you use ACM and application load balancer so your ALB terminates SSL. If so make sure:

    Traffic between ALB and instance is HTTP. SSL is terminated on the ALB, so after the ALB (inside your VPC) you're http only.