Skip to content

Instantly share code, notes, and snippets.

@dangtrinhnt
Created May 3, 2020 15:00
Show Gist options
  • Save dangtrinhnt/2c4cf5b951c651525885394d2414bc21 to your computer and use it in GitHub Desktop.
Save dangtrinhnt/2c4cf5b951c651525885394d2414bc21 to your computer and use it in GitHub Desktop.
Scale multiple ecs services
#!/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