AWS CLI ECR and ECS Cheat Sheet/Delete an ECS service

Remove an ECS service after scaling it down or forcing deletion.

Section: ECS Clusters and Services

Delete an ECS service

bash
bash
aws ecs delete-service --cluster my-cluster --service my-service --force
Explanation

Use with caution in production environments.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing ECS Clusters and Services
List services in a cluster
Show ECS service ARNs for a cluster.
OpenIn sheetbashsame section
Describe services
Inspect ECS service desired count, task definition, and deployment status.
OpenIn sheetbashsame section
Force a new ECS deployment
Restart service tasks using the current task definition.
OpenIn sheetbashsame section
List ECS clusters
Show cluster ARNs in the account and region.
OpenIn sheetbashsame section
Describe clusters
Inspect ECS cluster status and settings.
OpenIn sheetbashsame section
Create an ECS cluster
Create a new ECS cluster.
OpenIn sheetbashsame section