I have an Autoscaling Group behind an Application Load Balancer. Both of them are configured to use 2 subnets for 2 different AZ.
The Autoscaling Group is set to provision only 1 instance (min:1, max: 1, desired: 1)
Now in case of AZ failure the Load balancer will detect that the instance is Unhealthy and stop sending tarfic to it.
But i assume that the Autoscaling Group will consider the instance as Healthy, so it will not create a new instance in the second AZ.
So my question is there a way to make the Loadbalancer to notify the autoscaling group to terminate the instance in the failed AZ and to start a new one in the ok AZ ?
I now that the best practice is to set the Autoscaling group to provision for example 2 instances, one in each AZ. But is there a way to make it work with only 1 instance ?
Thanks.