AWS CloudFormation provides you with a mechanism to control how an auto scaling group updates your resources using the UpdatePolicy attribute. If you do not configure your settings correctly, a rolling update on an auto scaling group may be performed unexpectedly. You can address this scenario by using the AutoScalingRollingUpdate policy, which supports a number of options to configure your template.
Here is an example of the updated policy for rolling updates, which can be found in official AWS documentation at https://aws.amazon.com/premiumsupport/ knowledge-center/auto-scaling-group-rolling-updates/. You can also refer to a very good article on rolling updates with CloudFormation at https://cloudonaut.io/ rolling-update-with-aws-cloudformation/.