Created
May 3, 2020 15:00
-
-
Save dangtrinhnt/2c4cf5b951c651525885394d2414bc21 to your computer and use it in GitHub Desktop.
Scale multiple ecs services
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
#!/bin/bash | |
# service_text_file is the path to a text file that contains a list of service names, each service name is on each line | |
cluster=$1 | |
service_text_file=$2 | |
desired_count=$3 | |
while IFS= read -r line | |
do | |
echo "$line" | |
aws ecs update-service --cluster "$cluster" --service "$line" --desired-count 0 >/dev/null 2>&1 | |
done < "$service_text_file" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment