I have an auto scaling group at AWS with a few instances. I'd like to define one to be the primary one, where I'll also configure custom scripts to be run on it.
I thought I would enable the "termination protection" for this EC2 instance but it seems that this did not avoid it to be deleted by the Auto scaling group a few moments later.
Is there a way I can have an EC2 instance that is affected to the Auto-scaling group to always stay on ?
(Note: I want it to be accessible via the Load balancer, but I can't detach it from the auto scaling group because the CodeDeploy systeme I have implemented won't work with it?)