I’ve tried the same thing on my local machine where I was running the server on my local machine and it was working fine. Don’t know what’s the problem here.
Any help would be much appreciated.
The ec2 console when you click on your ec2 instance it has a DNS name and ip in the status info at the bottom.
You can also from inside the instance run curl http://169.254.169.254/latest/meta-data/public-ipv4 to get the ip. Then this is the ip you would use instead of localhost since this is running on a server in the cloud.
The security group is on the same screen and you can update it to allow ports in.
As far as making answers solutions there is also a button in the forum thread you can click on the response that was right if that was something you were asking about as well.