【发布时间】:2019-12-20 12:17:53
【问题描述】:
在 Cloudformation 中定义 Auto Scaling 组资源时,我需要将 AZRebalance 添加为 SuspendProcesses 的一部分。
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate 文档指出,这是 AutoScalingRollingUpdate UpdatePolicy 的一部分。
"UpdatePolicy" : {
"AutoScalingRollingUpdate" : {
"MaxBatchSize" : Integer,
"MinInstancesInService" : Integer,
"MinSuccessfulInstancesPercent" : Integer,
"PauseTime" : String,
"SuspendProcesses" : [ List of processes ],
"WaitOnResourceSignals" : Boolean
}
}
不幸的是,这会导致 ASG 中的实例在 LaunchConfig 发生更改时重新启动。在创建堆栈时有什么方法可以两全其美?即
1) 在创建堆栈时暂停 ASG 中的一些进程
2) 在 LaunchConfig 更改时禁用 ASG 中实例的滚动重启
【问题讨论】:
标签: amazon-web-services amazon-cloudformation autoscaling