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!

preguntada hace 2 meses116 visualizaciones
2 Respuestas
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
respondido hace 2 meses
0

Ah, it was the security group. <sigh>

respondido hace 2 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas