SSM Patch Manager LifeCycleHooks to remove node from TargetGroup

0

Working with AWS SSM to automate the patching of EC2 instances that are part of a target group. As patching will be carried out on live instances without any application downtime, we would like to cleanly remove the EC2 from the target group by de-registering them first and re-register pre and post reboot and patching.

Can this be achieved using say a SSM RunCommand as part of the Patching lifecycle hooks (PreInstall etc) or is there a better method?

profile picture
专家
已提问 10 个月前387 查看次数
1 回答
1
已接受的回答

Maybe the following Automation runbook provided by AWS will fit your use case.
https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/automation-awsec2-patch-load-balancer-instance.html

  1. The load balancer or target group to which the instance is attached is determined, and the instance is verified as healthy.
  2. The instance is removed from the load balancer or target group.
  3. The automation waits for the period of time specified for the connection draining time.
  4. The AWS-RunPatchBaseline automation is called to patch the instance.
  5. The instance is reattached to the load balancer or target group.
profile picture
专家
已回答 10 个月前
profile picture
专家
已审核 10 个月前
  • AWESOME.. Didnt find this.. Many thanks Riku!

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则