Desired capacity on Autoscaling Group doesn't automatically scale down to zero

I have an ECS cluster which is backed by an ECS autoscaling group, managed by a capacity provider.

When creating the autoscaling group, I have specified the capacities like so:

  • desired capacity: 0
  • maximum capacity: 1

As expected, the desired capacity automatically increments to 1 when I add a service which generates tasks for the ECS cluster.

However, once I have zero tasks running, and the desired task count of the service is set to zero, I would expect the desired instance count to return to zero.

This is not the case, and it remains at 1.

How can I have the desired instance count scale down to zero? Or else do I have to always do this manually?

It’s still not supported

https://stackoverflow.com/questions/72310885/configure-ecs-to-scale-to-zero-when-not-in-use

You have to Set both Desired AND Minimum to zero. It’s not typical.

why not just use fargate at this point?

CUDA

use AWS batch if you don’t need containers running 24/7

u/pragmojo hey have you found any solution for this ? Same issue here

When the SQS Queue is 0 , I want the ecs tasks and linked ASG instances to 3.

However, only ECS Tasks are set to 3 but not the ASG instances. ASG is not going down below 4 . Waited for more than an hour

Hello,

Sorry for any trouble! This article will provide additional context for your questions about scaling to zero.

We also have other ways you can reach out for help, here.

- Ann D.