Search code examples
djangoamazon-web-servicesamazon-ecsaws-application-load-balancer

AWS ALB DNS is not reachable


New to AWS.

I setup ECS and create a task with ALB. Running python Django application in ECS task on port 8000, and ALB shows healthy on status based on health endpoint.

When I try to run curl http://<DNS_ALB>/<healthcheck endpoint> its not able to return any data.

ALB shows healthy means that health check endpoint is reachable from ALB to ECS container.

There is not specific security, I am using all default VPC and Security group. Default security group has ALL inbound and ALL outbound open.

I know I have to change the security and all, but just trying to learn with default if all things works, then will add more security.

ALB is associated with sg-db32a7a1 StorageGroup.

ALB SG

This SG has all in/out open for all ports.

Inbound

Outbond


Solution

  • The default configuration only allows traffic from a certain security group in the rule set.

    At first sight, it looks like all traffic is allowed

    However, scrolling to the side reveals that there is a limitation on the source:

    Actually, there is a "source" value set

    I solved the problem by adding two new rules to allow IPv4 and IPv6 traffic.