AWS Opsworks auto-healing, load instances, and load balancer

Solution 1:

Autohealing is a feature enabled on a layer basis, for which it applies to all EC2 instances that belong to one layer. The way it works is that if the AWS OpsWorks agent that is installed on every EC2 fails to establish communication with OpsWorks, that instance is terminated and replaced.

http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-autohealing.html

The checks done by an Elastic Load Balancer are TCP/HTTP based, for which they test connectivity to specific ports, and the action performed by the ELB is that incoming traffic is routed to healthy instances in the layer the ELB is attached to until the unhealthy instance passes the ping test done by the ELB.

http://docs.aws.amazon.com/opsworks/latest/userguide/load-balancer.html

Load balanced instances are instances that are launched when load related triggers that you configure occur. For example you can configure a layer to add a new instance when incoming traffic for that layer makes online instances exceede CPU usage by 80%.

To answer your question, if an instance is considered unhealthy by an ELB, it is not replaced.