# How to restart an ECS service

How-to guides · Updated 16 November 2026

**Short answer:** ECS has no restart action: you restart a service by forcing a new deployment, which launches fresh tasks from the current task definition and drains the old ones. In the console, update the service and tick Force new deployment; on the CLI, run aws ecs update-service --cluster my-cluster --service my-service --force-new-deployment. It works the same for Fargate and EC2 launch types.

## What "restart" means for an ECS service

A service is a scheduler that keeps a number of tasks running. Restarting it really means replacing those tasks. There are three ways to do that, and they behave very differently under load:

| Method | What happens | Downtime? |
|---|---|---|
| Force new deployment | ECS starts a new deployment of the same task definition and rolls tasks over according to the service's deployment settings | No, if the minimum healthy percent keeps enough tasks up |
| Stop one task | The scheduler notices the gap and launches a replacement | No, if other tasks are serving |
| Set desired count to 0, then back | Every task stops before any new one starts | Yes, a full outage |

Use the forced deployment unless you have a reason not to. Scaling to zero is the mistake people reach for first, and it takes the service down completely.

## Console steps

1. Open the Amazon ECS console and choose your cluster.
2. On the **Services** tab, select the service and choose **Update**.
3. Leave the task definition revision as it is and select **Force new deployment**.
4. Choose **Update**. The service's **Deployments** tab now shows a new deployment marked as in progress next to the old one.

The new tasks appear on the **Tasks** tab. When the new deployment reaches its desired count and passes load balancer health checks, the old tasks are stopped.

## CLI steps

```
# Replace every task in the service
aws ecs update-service \
  --cluster my-cluster \
  --service my-service \
  --force-new-deployment \
  --query 'service.deployments[].{status:status,rollout:rolloutState,running:runningCount,desired:desiredCount}'

# Block until the rollout settles (returns non-zero if it doesn't within the waiter's limit)
aws ecs wait services-stable --cluster my-cluster --services my-service
```

To restart just one misbehaving task instead, find it and stop it; the service starts a replacement:

```
aws ecs list-tasks --cluster my-cluster --service-name my-service
aws ecs stop-task --cluster my-cluster \
  --task arn:aws:ecs:eu-west-2:123456789012:task/my-cluster/0abc1234def5678 \
  --reason "Manual restart: stuck worker"
```

The `--reason` text shows up in `describe-tasks` as the stopped reason, which helps whoever investigates later.

## Check before and after

- **Deployment settings.** Run `aws ecs describe-services --cluster my-cluster --services my-service --query 'services[0].deploymentConfiguration'`. With a minimum healthy percent of 100 and maximum of 200, ECS starts new tasks before stopping old ones. A minimum of 0 lets it stop everything first.
- **Spare capacity on EC2.** On the EC2 launch type the cluster needs room for the extra tasks during the overlap, or the deployment stalls with tasks stuck in PROVISIONING or placement errors.
- **Which image you get.** A forced deployment reuses the same task definition. If it references a mutable tag such as `:latest`, the new tasks pick up whatever that tag points to now, which may not be what was running before.
- **After the rollout,** confirm only one deployment remains with `rolloutState` COMPLETED and check the service events for health check failures.

## Common mistakes

- **Restarting to fix a crash loop.** If tasks keep stopping, new tasks will too. Read the stopped reason first; see [essential container exited](https://cloudconsole.dev/errors/ecs-essential-container-exited) and [failed ELB health checks](https://cloudconsole.dev/errors/ecs-task-failed-elb-health-checks).
- **Expecting new secrets or environment values without a deployment.** Values from Secrets Manager or Parameter Store are read when a task starts, so a forced deployment is exactly how you pick up a rotated secret.
- **Ignoring the circuit breaker.** If the deployment circuit breaker is on with rollback, a restart whose new tasks fail is rolled back automatically; check the service events rather than assuming it worked.

## Questions

### How do I restart an ECS Fargate service?

The same way as any ECS service: force a new deployment from the console or with aws ecs update-service --force-new-deployment. Fargate needs no spare cluster capacity, so the rollout is usually quicker than on EC2.

### Can I restart an ECS service without downtime?

Yes, provided the service runs more than one task (or its maximum percent allows a new task to start before the old one stops) and the minimum healthy percent is above zero. A single task with minimum healthy percent 0 will have a gap.

### Does force new deployment pull the image again?

It starts new tasks, and new tasks resolve the image reference again. With an immutable tag or digest you get the same image; with a mutable tag you get whatever it points to now.

## When this happens away from your desk

Restarting a service is often the first thing you want to do when a pager goes off on the move. CloudConsole, a phone app for AWS, is built to show service health and deployments on your phone, with guardrails around production changes.

[About the CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [Amazon ECS Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/)
- [UpdateService API reference](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html)

## Related

- [AWS ECS force new deployment](https://cloudconsole.dev/how-to/force-new-deployment-ecs)
- [aws ecs update-service](https://cloudconsole.dev/cli/ecs-update-service)
- [aws ecs stop-task](https://cloudconsole.dev/cli/ecs-stop-task)
- [How to scale an ECS service](https://cloudconsole.dev/how-to/scale-ecs-service)
- [Task failed ELB health checks in target group](https://cloudconsole.dev/errors/ecs-task-failed-elb-health-checks)
- [How to add my IP to an AWS security group](https://cloudconsole.dev/how-to/add-my-ip-to-security-group)

---

Source: https://cloudconsole.dev/how-to/restart-ecs-service

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
