AWS EC2 auto-scaling can use custom health checks. A script can check the instance health and call aws autoscaling set-instance-health to update the instance status to Unhealthy if the check fails.
However what if the instance becomes so unhealthy (CPU 100% used or network connection lost), that it could not even update its status to Unhealthy?
Is there a way to implement the EC2 auto-scaling custom health check in a way that, if the instance fails to send in healthy status regularly, for example every 5 minutes, auto-scaling group would treat the instance as unhealthy?