I've set up an AWS Fargate cluster to run a service and autoscale its tasks based on the SQS queue. All great so far. The service has got a desired tasks of 1, but then it never actually launches the task from the task definition.

Does anyone have advice on how to troubleshoot this sort of issue? It seems to me like this would be a backend problem with AWS. Or potentially a problem finding space on the subnet? (which is an empty subnet).

I have already checked the tasks filter for 'stopped' and 'running' tasks, no tasks have appeared in there for hours.

The frustrating thing is this was working previously, I recently made a couple of changes to the minimum number of tasks and the health check target group but I have reverted those changes since seeing this issue.

Any advice appreciated.

scaling issue screenshot


I'd check cloudtrail to see if there are any errors when ECS is trying to launch tasks (RunTask as the event name maybe?).

There's a bit of a delay from when someone happens to when it shows up in cloudtrail (maybe 10 minutes?) so you won't see any changes right away for stuff you do. But you could try raising the min an desired to 2, wait 10 minutes, then check to see what API call was made and what the result was.

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.