Auto Scaling Group terminate instances when a Scale-In event occurs. It is very important for you to understand how this termination works in order to architect your environment. Auto Scaling Group, use termination policies to determine which EC2 instances should be terminated when a Scale-In event is triggered. Understanding this behavior of Auto Scaling Groups is useful for you to deploy and update the environment. Termination policies are defined in the Auto Scaling Group configurations, and you can view the existing policies using the following command:
PS C:\> Get-ASAutoScalingGroup -AutoScalingGroupName WebAppASG |Format-Table AutoScalingGroupName,TerminationPolicies
You can have the following termination policies defined in the ASG. If you have more than one policy defined in the ASG, then these are executed in order. If the evaluated policy does...