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:
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:
The is no any clarifications or examples in the documentation regarding this.
2
Answers
I was missing "Cluster" in the request.
You need to add the service name and cluster name in update service in EventBridge.