-1

Is this possible in AWS auto-scaling that I want to scale-up my instances by every 5 min by 2. That mean if my running instances are 2 so after 5 min it will be 4 then next 5 min it will be 6 and so on... How will I achieve this in auto-scaling (Schedule action, Policies etc.)

shubham kamboj
  • 101
  • 1
  • 11
  • _WHY_ would you want to do this? Normally, Auto scaling is used to _react_ to workload, rather than always increasing workloads. If you are expecting a particular capacity (eg workers starting at 9am), you can use a _schedule_ to trigger an Auto Scaling policy at a particular time. – John Rotenstein Jul 24 '20 at 13:08

2 Answers2

1

yes, you can do it.


Something like this, it takes a form of crontab every 10 minutes [Minute] [Hour] [Day_of_Month] [Month_of_Year] [Day_of_Week].

aws autoscaling put-scheduled-update-group-action --scheduled-action-name my-recurring-action \
  --auto-scaling-group-name my-asg --recurrence "10 0 * * *" --desired-capacity 3 

more details here

HumayunM
  • 514
  • 4
  • 12
0

You can achieve it by auto-scaling group policy easily, select the cooldown period to be 5 mins and add a policy action to increase 2 instances if the CPU usage >=0, this will add 2 instances every 5 mins to the auto-scaling group

AWS PS
  • 4,420
  • 1
  • 9
  • 22