Last active
February 25, 2020 06:29
-
-
Save sagarchauhan005/4956492feafdb03602d77757089fb437 to your computer and use it in GitHub Desktop.
Start/Stop/Pause elastic beanstalk environment shell script
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
#!/usr/bin/env bash | |
#$1 : Minimum number of instance | |
#$2 : Maximum number of instance | |
#<auto-scaling-group-name> : To find this, visit EC2 section in your aws management dashboard and in your left sidebar, | |
# click on AUTO SCALING GROUPS at the very bottom and it shall display all the scaling groups of your EBS. | |
# Select your group name from there. | |
RED="\033[1;31m\n" | |
NOCOLOR="\033[0m\n" | |
YELLOW='\033[0;33m' | |
# Staging | |
aws autoscaling update-auto-scaling-group --auto-scaling-group-name <auto-scaling-group-name> --min-size "$1" --max-size "$2" | |
printf "${YELLOW}Instance set to minimum $1 and maximum $2 ${NOCOLOR}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment