Stack Overflow Asked by mac187 on December 13, 2020
can anyone please explain me this a little bit? I will be very happy for some example? Maybe a dummy example hehe. I want to really understand when and why to use this with a good example 🙂
Thank you 🙂
The AutoScalingScheduledAction is used when you are updating your AWS::AutoScaling::AutoScalingGroup in CloudFormation.
Generally, when you have scheduled policies on you ASG, number of instances will go up and down based on the schedule in the policy. When you update your stack with ASG, CloudFormation will use the group size that is defined in the template. This is of course problematic, because your scheduled policy could be in effect and your ASG may be greater or smaller that what is in the template. Thus, the update will force the ASG to go back to its original size, which may be not desired.
AWS CloudFormation always sets the group size property values of your Auto Scaling group to the values that are defined in the AWS::AutoScaling::AutoScalingGroup resource of your template, even if a scheduled action is in effect.
To rectify the issue, you can use IgnoreUnmodifiedGroupSizeProperties
with value of true
. This ensures that when your ASG gets updated, the ASG size is not going to be changed and the ASG size based on the scheduled policy will be preserved.
Correct answer by Marcin on December 13, 2020
A scheduled action is used if you want specific capacities during certain times of the day, week or month. By using this you can define the minimum and maximum capacities based on either a cron expression (which will trigger recurrences) or specifying a start date time which would provide this action at a specific date time.
An example might be a test environment for your application, you only want it to run during your core business hours but evenings and weekends you want it to be either lower server capacity or maybe even zero. This would use an expression.
Another example might be planned maintenance, during this time you want to reduce your server pool size as there will be no traffic hitting your applications. You would specify a specific date.
Remember that you would need a policy for each action, so if it needs to change and then revert back to its previous state it will be 2 seperate actions.
This should only be used for fixed patterns, if it is to be based on predictive traffic you would look at predictive scaling.
Answered by Chris Williams on December 13, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP