Suggested Answer:C🗳️
If the user wants to delete the Auto Scaling group, the user should manually set the values of the minimum and desired capacity to 0. Otherwise Auto Scaling will not allow for the deletion of the group from CLI. While trying from the AWS console, the user need not set the values to 0 as the Auto Scaling console will automatically do so.
C
If we don't set the minimum and desired capacity to 0, Auto Scaling will not allow for the deletion of the group from CLI.
However from Console, Auto Scaling will automatically set the desired capacity to 0
The correct steps are:
1. Set the minimum size and desired capacity of the Auto Scaling group to 0.
2. Wait for any existing instances to be terminated by the Auto Scaling group.
3. Use the as-delete-group command to delete the Auto Scaling group.
https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-process-shutdown.html#as-shutdown-lbs-delete-asg-cli
"When you delete an Auto Scaling group, its desired, minimum, and maximum values are set to 0."
If the group has instances or scaling activities in progress, use the delete-auto-scaling-group command with the --force-delete option. This will also terminate the Amazon EC2 instances.
aws autoscaling delete-auto-scaling-group --auto-scaling-group-name my-asg --force-delete
Correction. If you use aws autoscaling delete-auto-scaling-group [--force-delete --auto-scaling-group-name my-asg only , It will delete the group. By default Force will not be active.
To remove instances from the Auto Scaling group before deleting it, call DetachInstances with the list of instances and the option to decrement the desired capacity. This ensures that Amazon EC2 Auto Scaling does not launch replacement instances.
Ref : https://docs.aws.amazon.com/cli/latest/reference/autoscaling/delete-auto-scaling-group.html
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
onlinebaba
Highly Voted 2 years, 6 months agoalbert_kuo
Most Recent 9 months agoFinger41
1 year, 8 months agogispankaj
2 years, 6 months agoLukaseffen
2 years, 6 months agotetural
2 years, 6 months agonewbie2019
2 years, 6 months agokarmaah
2 years, 6 months ago