【问题标题】:how to force terminate aws instances which are stuck in Waiting for Launch Lifecycle Action state如何强制终止卡在等待启动生命周期操作状态的aws实例
【发布时间】:2020-02-03 03:00:17
【问题描述】:

我想知道如何强制终止卡在 Waiting for Launch Lifecycle Action 状态的 aws 实例。

由于我的实例在这种状态下被放弃,我无法实现额外的自动缩放。

当我尝试时

 aws autoscaling terminate-instance-in-auto-scaling-group --instance-id $i --should-decrement-desired-capacity

我遇到了

An error occurred (ScalingActivityInProgress) when calling the TerminateInstanceInAutoScalingGroup operation: Activity 87a5b65f-3f73-64da-f2d7-0721543f3cff is in progress.
aws autoscaling terminate-instance-in-auto-scaling-group --instance-id i-abcd --should-decrement-desired-capacity

【问题讨论】:

    标签: amazon-web-services amazon-ec2 aws-lambda autoscaling


    【解决方案1】:

    使用 ABANDON 的结果完成生命周期操作,而不是终止实例。例如,

    $ aws autoscaling complete-lifecycle-action \
      --lifecycle-hook-name YOUR_HOOK_NAME \
      --auto-scaling-group-name YOUR_GROUP_NAME \
      --lifecycle-action-result ABANDON \
      --instance-id YOUR_INSTANCE_ID
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-10-07
      • 2019-05-07
      • 2015-04-15
      • 2013-07-21
      • 1970-01-01
      • 2015-06-20
      • 2019-12-25
      • 2018-09-15
      相关资源
      最近更新 更多