gpt4 book ai didi

amazon-web-services - 使用 CloudFormation 模板对 ASG 使用 UpdatePolicy 时,何时使用 AutoScalingScheduledAction?

转载 作者:行者123 更新时间:2023-12-03 07:42:33 25 4
gpt4 key购买 nike

谁能给我解释一下吗?我会很高兴举一些例子?也许是一个虚拟的例子呵呵。我想通过一个很好的例子来真正了解何时以及为何使用它:)

谢谢:)

最佳答案

AutoScalingScheduledAction当您更新 AWS::AutoScaling::AutoScalingGroup 时使用在 CloudFormation 中。

通常,当您为 ASG 安排策略时,实例数量将根据策略中的计划增加或减少。当您使用 ASG 更新堆栈时,CloudFormation 将使用模板中定义的组大小。这当然是有问题的,因为您预定的策略可能会生效,并且您的 ASG 可能会大于或小于模板中的值。因此,更新将迫使 ASG 恢复到其原始大小,这可能是不希望的。

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.

要解决此问题,您可以使用值为 trueIgnoreUnmodifiedGroupSizeProperties。这可确保当您的 ASG 更新时,ASG 大小不会更改,并且将保留基于计划策略的 ASG 大小。

关于amazon-web-services - 使用 CloudFormation 模板对 ASG 使用 UpdatePolicy 时,何时使用 AutoScalingScheduledAction?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63085410/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com