I created a classic loadbalancer on AWS with two EC2 instances running a simple flask application.

enter image description here

The security group on the ELB is set to allow all inbound/outbound. The security groups for the EC2 instances are set to HTTP port 5000. The health of instances is good - I can see that in the ELB dashboard and also can see the 200 ping responses from my applications in debug. I can access the webapplications directly when using the EC2's ip addresses with no problem. However, when using ELB's public DSN, the request times out:

enter image description here

This timeout occurs even if the applications are not running. So I assume that the problem is at the front end (with ELB). I have gone through tons of aws troubleshoot suggestions (which are not very straightforward for me as a starter) but did not manage to get it working. Any ideas?


Security Group allowing all traffic from all sourcesCheck your ELB's security group that it's allowing to access port 80.

You say 'set to default' but by default there are no inbound rules on a security group.

| improve this answer | |
  • Yes, firewalls are set "All traffic" - I assume that covers – Nazar Mar 13 '18 at 12:12
  • "All traffic" just means all protocols/ports, the source still needs to be set to allow traffic from all IPs. Added image to illustrate. – Jason Floyd Mar 14 '18 at 7:11
  • 1
    Yep, explicitly specifying the rules solved the problem. Thank you. – Nazar Mar 16 '18 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.