Reputation: 415
So I have this scenario where an Amazon EC2 instance in an Auto Scaling group will be terminated. My problem is that I don’t want it terminated until it has finished whatever it’s doing.
If I hook up a lambda, the lambda would check a metric, if this metric is > 0 then it needs to wait 60 seconds.
I have this done already, the problem is it may take more than the Max timeout for lambdas of 15 minutes, to finish the jobs it’s processing.
If I read correctly, the lifecycle notification is only sent once, so this lambda won’t work for me.
Is there any other way of doing this?
Upvotes: 0
Views: 415
Reputation: 1
you can reinvoke the lambda function in 5 minutes so that it continues checking
Upvotes: 0
Reputation: 545
Here is how I would try to approach this problem (this is a needs a POC, the answer is theoretical):
Upvotes: 1