Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS AutoScaling: how to disable health checks

I have a Rube Goldberg system where I launch spot-priced instances in autoscaling groups, without actually being interesting in autoscaling features. It all comes from not being able to get spot-priced instances directly using CloudFormation. Don't ask...

Anyway, for my use case, I want to effectively disable health checks. I never want instances terminated and replaced, ever. I will do all that manually. Because of health checks I am rather often seeing my carefully constructed instances being terminated, and it is very annoying.

So, what are my options?

  1. Grace period set to maybe 0 or -1 as a way of saying grace period forever?
  2. Grace period set to Integer.MAX_INT which is probably good enough?
  3. set-instance-health which they advertise for custom health checks: does that override EC2 status checks? Is it permanent?

Thanks for your help!

like image 827
lassewesth Avatar asked Jun 29 '16 08:06

lassewesth


People also ask

How do I turn off health check?

On the Listener tab, find the listener for which you want to disable the health check feature and click Modify Listener in the Actions column. On the Configure Listener page, click Next to proceed to the Health Check wizard page. Turn off the Enable Health Check switch and click Next. Click Submit and click OK.

What happens if an EC2 in Auto Scaling configuration instance does not pass health checks?

If the instance is in any Amazon EC2 state other than running , or if its status for the status checks becomes impaired , Amazon EC2 Auto Scaling considers the instance to be unhealthy and replaces it.

How do I turn off Auto Scaling AWS?

On the Automatic scaling tab, under Dynamic scaling policies, select the check box in the top right corner of the desired scaling policy. Scroll to the top of the Dynamic scaling policies section, and choose Actions, Disable.

What actions will be taken if an instance fails the health checks?

If an instance fails these status checks, it is marked unhealthy and is terminated while Amazon EC2 Auto Scaling launches a new replacement instance. You can attach one or more load balancer target groups, one or more Classic Load Balancers, or both to your Auto Scaling group.


1 Answers

So, I asked AWS Support and the kind Dan H. told me about suspending processes, which is exactly what I need: http://docs.aws.amazon.com/autoscaling/latest/userguide/as-suspend-resume-processes.html - I can actually disable health checks directly.

like image 150
lassewesth Avatar answered Sep 20 '22 20:09

lassewesth