Cannot adjust desired tasks of a service

0

Trying to update the number of desired tasks of an ECS service, I get an error:

"There are no capacity providers in the capacity provider strategy with a weight value greater than zero. Specify a weight value greater than zero for at least one capacity provider and try again."

However the capacity provider is already set to Fargate with base 0 and weight 100.

asked 2 months ago283 views
1 Answer
2

The error "There are no capacity providers in the capacity provider strategy with a weight value greater than zero" occurs when trying to adjust the desired tasks of an ECS service because the capacity provider's base value is set to 0, which means no tasks should be running.

To resolve this, check the service definition, update the base value to a non-zero number (at least 1 if you want tasks to run), and then update the desired task count for the service using the AWS Management Console, CLI, or infrastructure as code configuration.

Setting a non-zero base value for the capacity provider strategy should allow adjusting the desired tasks without encountering the error.

profile picture
EXPERT
answered 2 months ago
  • The problem went away without any obvious changes - so I can't try this. The documentation for base states "The Base is the minimum number of tasks to run on a particular capacity provider." so it's not clear why this needs to be non-zero. Thank you for the reply in any case and I will try this if I see the error again.

  • Thank. Reply acceptance is appreciated.

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