Unanswered
Hello! I’M Wondering If There Is An Option To Run A Termination Hook Script
Tricky question!
I see this asg with a TargetTrackingPolicy for both scale up (if queue size >0) and down, but scale down goes (additionally or only) through a custom policy – check if specific machine can be shutdown. For this we need to make sure there's no job running there. Two ways to do it –
- Instance protection set on/off which is simple.
- Compare machines that the ASG wants to shutdown with machines having
tasks {}
retrieved from the API. If task is running, avoid shutting down this machine. This can happen in a Lambda function.
151 Views
0
Answers
2 years ago
one year ago