14

I have a site built on NodeJS, which I am currently trying to deploy on the free tier on AWS.

So far I have created an instance, launched it, I can connect via SSH (console) to my instance, and have successfully pulled my files from my Git repository. However, when I try to browse my public DNS, I get: ec2-54-252-151-208.ap-southeast-2.compute.amazonaws.com:8080 took too long to respond.

I have also had a look at the settings on security group (as recommended on a different post) and ensured that inbound and outbound 'HTTP' and 'HTTPS' traffic are allowed (screenshot below):

Inbound settings: Inbound settings

Outbound settings: enter image description here

Any ideas on what else could be causing this issue? I would greatly appreciate your help. Thanks.

Harry
  • 325
  • 1
  • 4
  • 12

5 Answers5

23

It looks like you need to add port 8080 to your inbound IP rules.

BryceH
  • 2,740
  • 2
  • 21
  • 24
5

Adding a rule in EC2 > Security Groups > worked for me

enter image description here

Pratik
  • 676
  • 10
  • 9
2

If you stopped and then started your ec2 instance it gives you another Public DNS (IPv4). So you may be requesting old Public DNS without noticing it. In this case, you highly likely to get this type error!

1

adding to @Rastamjon answer. Your ip may change on restarting your instance. This can be avoided by taking an elastic ip and attacing it to your instance. Read more about it here. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html

Abhijith Konnayil
  • 4,067
  • 6
  • 23
  • 49
-1

In case you are on windows RDP turn off your public firewall of the remote's machine.

Mujahidul Islam
  • 265
  • 4
  • 8