2

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

7
  • Does the security group of the load balancer allow inbound https (443) traffic from your client ip? Commented Apr 16, 2022 at 7:48
  • How can I check that? Commented Apr 16, 2022 at 7:54
  • See the update the associated security group section here docs.aws.amazon.com/elasticloadbalancing/latest/application/… Commented Apr 16, 2022 at 8:08
  • What are the listener rules that you use? Commented Apr 16, 2022 at 8:09
  • 1
    Sadly your question lacks details. For example you got your domain from R53 and SSL from ACM. Did you create alias record in R53 to point to the ALB? Please provide all relevant details of your setup, including full setup of your listener rules, how do you test the connections, and more. Commented Apr 16, 2022 at 10:17

1 Answer 1

2

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

  • Your load balancer has a security group allowing inbound 443 from internet and outbound 3000 to your EC2 instance
  • Your EC2 instance hosting your node app has a security group allowing inbound 3000 from ALB

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.