Delete a step scaling policy for Application Auto Scaling using the Amazon CLI
When you no longer need a step scaling policy, you can delete it. To delete both the scaling policy and the associated CloudWatch alarm, complete the following tasks.
To delete your scaling policy
Use the delete-scaling-policy
Linux, macOS, or Unix
aws application-autoscaling delete-scaling-policy --service-namespace
ecs
\ --scalable-dimensionecs:service:DesiredCount
\ --resource-idservice/my-cluster/my-service
\ --policy-namemy-step-scaling-policy
Windows
aws application-autoscaling delete-scaling-policy --service-namespace
ecs
^ --scalable-dimensionecs:service:DesiredCount
^ --resource-idservice/my-cluster/my-service
^ --policy-namemy-step-scaling-policy
To delete the CloudWatch alarm
Use the delete-alarmsStep-Scaling-AlarmHigh-ECS:service/my-cluster/my-service
and
Step-Scaling-AlarmLow-ECS:service/my-cluster/my-service
alarms.
aws cloudwatch delete-alarms --alarm-name
Step-Scaling-AlarmHigh-ECS:service/my-cluster/my-service
Step-Scaling-AlarmLow-ECS:service/my-cluster/my-service