I have an auto-scaling group [ASG] with minimum 4 EC2 instances.
As I understand from the documentation, if I terminate [on purpose/by mistake from console/API] 1 EC2 instance another one will spawn and take its place.
But, what if I terminate all 4 instances at once [a wrong API call] ? The ASG will launch 4 new instances automatically , however my application will experience a [variable] downtime.
Can I somehow be protected from such a scenario? Can I set in AWS something that tells 'There must be at least 1 or 2 live instances at all times' ?