Created
August 29, 2018 14:48
-
-
Save thomaspoignant/ea03641b6d6abc09cd9a6944cbe3c029 to your computer and use it in GitHub Desktop.
Update the number of container in ECS
This file contains hidden or 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 | |
if [ "$#" -ne 3 ]; then | |
echo "Usage : ${0} <Environement> <Classifier> <Desired number of Services instances>" | |
echo " Envionnement : dev / qua / pre / ppd / for" | |
echo " Classifier : 1 or 2" | |
return | |
fi | |
#Bind input parameters | |
env=${1} | |
classifier=${2} | |
count=${3} | |
cluster_name=ecs-${project}-${env}-${classifier} | |
#Constant | |
project="project_name" | |
region="eu-west-1" | |
services_list=("service1" \ | |
"service2" ) | |
for service in ${services_list[@]}; do | |
service_name=${service}-${project}-${env}-${classifier} | |
echo "=========== Update config for ${service_name}" | |
aws ecs update-service --cluster ${cluster_name} --service ${service_name} --desired-count ${count} --region ${region} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment