Skip to content

Instantly share code, notes, and snippets.

@dangtrinhnt
Created May 3, 2020 15:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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