How to disable instance termination after a failed health check by asg ?

0

my asg is taking health check from load-balancer but i need to disable the instance termination without affecting the running website to investigate the the issue of failed health .

vinay
質問済み 1年前531ビュー
1回答
1

Hi Vinay,

For your purpose, you may want to use the lifecycle hook (activated by the ASG service when it prepares termination) corresponding to instance termination in the ASG: https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html#lifecycle-hooks-availability

And then, in this hook, you send detach commands to ASG service to remove this instance from the group: see https://docs.aws.amazon.com/autoscaling/ec2/userguide/detach-instance-asg.html

Best,

Didier

profile pictureAWS
エキスパート
回答済み 1年前
  • Detach can only be run on InService instances. It will fail on ones in Terminating:Wait

    But the hook would give time to notify a human to manually investigate or have a snapshot taken to be reviewed later

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ