[ aws . autoscaling ]
Deletes the specified Auto Scaling group.
If the group has instances or scaling activities in progress, you must specify the option to force the deletion in order for it to succeed.
If the group has policies, deleting the group deletes the policies, the underlying alarm actions, and any alarm that no longer has an associated action.
To remove instances from the Auto Scaling group before deleting it, call the DetachInstances API 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.
To terminate all instances before deleting the Auto Scaling group, call the UpdateAutoScalingGroup API and set the minimum size and desired capacity of the Auto Scaling group to zero.
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
delete-auto-scaling-group
--auto-scaling-group-name <value>
[--force-delete | --no-force-delete]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--auto-scaling-group-name
(string)
The name of the Auto Scaling group.
--force-delete
| --no-force-delete
(boolean)
Specifies that the group is to be deleted along with all instances associated with the group, without waiting for all instances to be terminated. This parameter also deletes any lifecycle actions associated with the group.
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
See ‘aws help’ for descriptions of global parameters.
To delete an Auto Scaling group
This example deletes the specified Auto Scaling group:
aws autoscaling delete-auto-scaling-group --auto-scaling-group-name my-auto-scaling-group
To delete the Auto Scaling group without waiting for the instances in the group to terminate, use the --force-delete
parameter:
aws autoscaling delete-auto-scaling-group --auto-scaling-group-name my-auto-scaling-group --force-delete
For more information, see Deleting Your Auto Scaling Infrastructure in the Amazon EC2 Auto Scaling User Guide.
None