I need to add AZRebalance as part of SuspendProcesses when defining an auto scaling group resource in Cloudformation.
The documentation https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate points to having this is as part of AutoScalingRollingUpdate UpdatePolicy.
"UpdatePolicy" : {
"AutoScalingRollingUpdate" : {
"MaxBatchSize" : Integer,
"MinInstancesInService" : Integer,
"MinSuccessfulInstancesPercent" : Integer,
"PauseTime" : String,
"SuspendProcesses" : [ List of processes ],
"WaitOnResourceSignals" : Boolean
}
}
Unfortunately, this causes instances in the ASG to restart whenever there is a change in LaunchConfig. Is there any way to get the best of both worlds at the time of stack creation? i.e
1) Suspend some processes in ASG at the time of stack creation
2) Disable rolling restart of instances in ASG when LaunchConfig changes