Created
July 18, 2021 09:09
-
-
Save markilott/378ce567213bd38d1c96b42910dcc777 to your computer and use it in GitHub Desktop.
Set desired task count to start/stop Fargate tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
const ecs = new AWS.ECS(); | |
// Update the desired task count | |
await ecs.updateService({ | |
service, | |
cluster, | |
desiredCount: 0, // 0 to stop, 1 (or more) to start | |
}).promise(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment