ECS FARGATE Spot task does not start, previously worked fine

0

I have an ECS Cluster with Fargate Spot capacity provider. I have a single service for phpMyAdmin, which I set the desired task count to 1 when I want to use it, and 0 when I am done. Super frugal. Previously (about 3 weeks ago), it would take about10 seconds to get a public IP and startup, and I would use the new public IP to access the service (via http), login, do SQL stuff etc.

However, now this does not work. I get a 'This site can’t be reached' error, so I don't believe it is Security Groups or NACLs (nothing has changed). The ECS task appears to reach steady state (via cloudtrail), but the website is inaccessible. There is no Stop notification.

I created a new task definition and enabled CloudWatch. All I am seeing in the logs is this:

[mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.57 (Debian) PHP/8.2.16 configured -- resuming normal operations [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

Any help appreciated!

2 Answers
1

Hello!

Posting the answer for others that may have come across a similar issue. As you have rightly pointed out, to access the website hosted within the ECS container, the security group of the ECS Instance/Fargate Task must allow traffic via the port that is exposed. References: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-rules-reference.html https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html#default-network-acl

profile pictureAWS
answered 2 months ago
0

Ah, it was the security group. <sigh>

answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions