Below is my configuration:
I have created an ECS cluster with maximum number of task = 1 and with number of ec2.micro instance = 1 and 1 service. I have configured 1 target group listening to port 80 with Registered targets to the ec2 (belonging to same ECS cluster) and its status is healthy.
I have configured ALB with the above target group with public subnets (both subnets have ig-xxxxxx) I have configured the service in my ECS cluster with the above Application Load Balancer. Deployed (to ECS) docker image is binding to host port 80.
When I try to access my app directly from ec2's IP I get 200 with expected json. However the ALB URL is not working whatsoever.
Any idea what am I missing here.
Thanks in advance.
EDIT: Ping output:
[email protected]:~$ ping pl-alb-1386183277.ap-southeast-2.elb.amazonaws.com PING pl-alb-1386183277.ap-southeast-2.elb.amazonaws.com (188.8.131.52) 56(84) bytes of data. ^C --- pl-alb-1386183277.ap-southeast-2.elb.amazonaws.com ping statistics --- 13 packets transmitted, 0 received, 100% packet loss, time 12278ms [email protected]:~$ ping 184.108.40.206 PING 220.127.116.11 (18.104.22.168) 56(84) bytes of data. ^C --- 22.214.171.124 ping statistics --- 9 packets transmitted, 0 received, 100% packet loss, time 8197ms [email protected]:~$
[email protected]:~$ dig pl-alb-1386183277.ap-southeast-2.elb.amazonaws.com ; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> pl-alb-1386183277.ap-southeast-2.elb.amazonaws.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26707 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 65494 ;; QUESTION SECTION: ;pl-alb-1386183277.ap-southeast-2.elb.amazonaws.com. IN A ;; ANSWER SECTION: pl-alb-1386183277.ap-southeast-2.elb.amazonaws.com. 60 IN A 126.96.36.199 ;; Query time: 207 msec ;; SERVER: 127.0.0.53#53(127.0.0.53) ;; WHEN: Mon May 06 11:51:21 AEST 2019 ;; MSG SIZE rcvd: 95
Screenshot of the VPS settings:
Route Table has IGW attached to it under "Routes" section.