I created a new EC2 instance and a new SG and set the inbound rules to accept custom TCP on port 8080 as well as HTTP and SSH and use that one for my EC2 instance. I can ping the Public DNS and get a "connection refused". The problem is when I create a simple node server on the instance and start it to listen to port 8080, ec2-x-x-x-x.compute-1.amazonaws.com:8080 times out.
Now, if I reroute incoming traffic from port 80 to port 8080 using iptables I can just call the Public DNS and of course I get a response. I also can use a load balancer for this purpose but my question is, does the Public DNS resolve to the VPC? why can't I just hit the endpoint ec2-x-x-x-x.compute-1.amazonaws.com:8080 and get a response from the node server that's running on my instance?