skip to Main Content

I want to shutdownstartup ECS tasks by schedule for saving costs.
I decided to use EventBridge Scheduler to update service desiredTaskCount to 0 and back to the desired amount.

The problem is the console interface doesn’t provide any clues how to pass the correct data. it just promts for a JSON object in the following format:
enter image description here

And this is completely different from API description for UpdateSerivce operation.

So I’m not sure what’s the correct way of passing service ARN and the properties I want to update.
I’ve tried out several formats but it doesn’t work so far:
enter image description here
enter image description here
enter image description here
enter image description here

The is no any clarifications or examples in the documentation regarding this.

2

Answers


  1. Chosen as BEST ANSWER

    I was missing "Cluster" in the request.


  2. You need to add the service name and cluster name in update service in EventBridge.

    {
      "Service": "service_name",
      "Cluster": "cluster_name",
      "DesiredCount": 0/1
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search