• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

AWS CLI AutoScaler Update

April 27, 2020

Here’s the AWS CLI command to set the Auto Scaling Group to a certain number for the minimum, maximum, and desired number of instances.

#!/bin/bash
# Format:  
# ./autoscaling.sh 3
# ./autoscaling.sh 0
int=$1
aws autoscaling update-auto-scaling-group \
--auto-scaling-group-name your-auto-scaling-group \
--min-size $int \
--max-size $int \
--desired-capacity $int \
--region us-east-2

#!/bin/bash # Format: # ./autoscaling.sh 3 # ./autoscaling.sh 0 int=$1 aws autoscaling update-auto-scaling-group \ --auto-scaling-group-name your-auto-scaling-group \ --min-size $int \ --max-size $int \ --desired-capacity $int \ --region us-east-2

Format:

./autoscaling.sh 0
./autoscaling.sh 3

./autoscaling.sh 0 ./autoscaling.sh 3

Filed Under: Cloud Tagged With: auto scaling, aws, desired capacity, maximum, minimum, update

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023