---
title: "ECS tasks stuck in PROVISIONING with a capacity provider | Proofline"
description: "Read the task's lastStatus, the capacity provider's managedScaling, and the Auto Scaling group's size, activities and instances, in that order."
url: https://proofline.sh/learn/ecs-capacity-provider-tasks-stuck-provisioning/
---

[Learning center](/learn/)

# ECS tasks stuck in PROVISIONING with a capacity provider

Read the task's lastStatus, the capacity provider's managedScaling, and the Auto Scaling group's size, activities and instances, in that order. Each step rules out one cause: a group already at MaxSize, a capacity provider that cannot scale the group, launches that fail, or instances that launch but never register with the cluster.

Capacity overruns The Proofline team November 22, 2026 7 min read

## The signature

A service uses an Auto Scaling group capacity provider. During a deployment or scale-out, its new tasks have `lastStatus` `PROVISIONING` and stay there. No stopped task explains it, because nothing has failed yet.

`PROVISIONING` means ECS has more steps to perform before the task launches. With an Auto Scaling group capacity provider, a task waits in this state for capacity: if the group cannot scale out to accommodate the tasks, they do not move beyond `PROVISIONING`. [Task lifecycle](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle-explanation.html) · [Auto Scaling group capacity providers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html)

With managed scaling on, ECS publishes `CapacityProviderReservation` in the `AWS/ECS/ManagedScaling` namespace and drives a target tracking policy on the group with `targetCapacity` as its target. A value above 100 means tasks are waiting for instances. A short wait during scale-out is normal; a wait that outlasts instance launch and agent registration is the signature this guide covers. [Cluster auto scaling](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-auto-scaling.html)

## The nearby causes

-   **The group is at its maximum.** ECS cluster auto scaling does not change the group's minimum or maximum size, so once `DesiredCapacity` equals `MaxSize`, nothing adds instances.
-   **The capacity provider cannot scale the group.** Managed scaling is `DISABLED`, the service has no capacity provider strategy, the ECS-managed scaling policy was changed or the `AmazonECSManaged` tag was removed, or the tasks are larger than the smallest instance type in the group.
-   **Instances fail to launch.** The group raised its desired capacity, but its scaling activities fail.
-   **Instances launch but do not register.** EC2 instances are `InService` in the group, but they never appear as `ACTIVE` container instances with a connected agent in this cluster.

[Cluster auto scaling considerations](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-auto-scaling.html) · [Managed scaling behavior](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/managed-scaling-behavior.html)

## Read the task and the capacity provider

Use a read-only profile and replace the uppercase placeholders.

```
aws ecs describe-tasks \
  --profile PROFILE --region REGION --cluster CLUSTER --tasks TASK_ARN_1 TASK_ARN_2 \
  --query 'tasks[].{task:taskArn,definition:taskDefinitionArn,status:lastStatus,desired:desiredStatus,provider:capacityProviderName,created:createdAt,host:containerInstanceArn,cpu:cpu,memory:memory}' \
  --output table --no-cli-pager

aws ecs describe-services \
  --profile PROFILE --region REGION --cluster CLUSTER --services SERVICE \
  --query 'services[0].{launch:launchType,strategy:capacityProviderStrategy,deployments:deployments[].{definition:taskDefinition,strategy:capacityProviderStrategy,running:runningCount,pending:pendingCount}}' \
  --output json --no-cli-pager

aws ecs describe-capacity-providers \
  --profile PROFILE --region REGION --capacity-providers CAPACITY_PROVIDER \
  --query 'capacityProviders[].{name:name,status:status,update:updateStatus,reason:updateStatusReason,asg:autoScalingGroupProvider.autoScalingGroupArn,scaling:autoScalingGroupProvider.managedScaling}' \
  --output json --no-cli-pager
```

A task with no capacity provider strategy is ignored by capacity providers and causes no scale-out; a service that sets `launchType` cannot set a strategy. A capacity provider can be used only when its `status` is `ACTIVE`. In `scaling`, check `status`, `targetCapacity` (above 0 and at most 100; the default 100 keeps no spare instances), `minimumScalingStepSize`, `maximumScalingStepSize` and `instanceWarmupPeriod` (300 seconds by default). [ManagedScaling](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ManagedScaling.html) · [CapacityProvider](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CapacityProvider.html)

Compare the task's `cpu` and `memory` with the smallest instance type in the group. A task group whose requirements exceed the smallest instance type cannot run with this capacity provider, the provider does not scale the group for it, and the task stays waiting. [Managed scaling behavior](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/managed-scaling-behavior.html)

## Read the Auto Scaling group

```
aws autoscaling describe-auto-scaling-groups \
  --profile PROFILE --region REGION --auto-scaling-group-names ASG_NAME \
  --query 'AutoScalingGroups[0].{min:MinSize,max:MaxSize,desired:DesiredCapacity,suspended:SuspendedProcesses[].ProcessName,instances:Instances[].{id:InstanceId,type:InstanceType,state:LifecycleState,health:HealthStatus}}' \
  --output json --no-cli-pager

aws autoscaling describe-scaling-activities \
  --profile PROFILE --region REGION --auto-scaling-group-name ASG_NAME --max-records 10 \
  --query 'Activities[].{start:StartTime,status:StatusCode,message:StatusMessage,description:Description,cause:Cause}' \
  --output json --no-cli-pager
```

Activities are ordered by start time, with those in progress first. When a launch fails, the activity's `StatusCode` is `Failed` or `Cancelled` and its `StatusMessage` gives the cause. A suspended `Launch` process stops the group from adding instances, and a suspended `AlarmNotification` stops the alarms behind managed scaling from changing its desired capacity. Auto Scaling can also suspend processes itself, most often for a group that has tried and failed to launch instances for over 24 hours. [Verify a scaling activity](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-verify-scaling-activity.html) · [Suspended processes](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html) · [Activity fields](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_Activity.html) · [AutoScalingGroup fields](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_AutoScalingGroup.html)

Then match the group's `InService` instance IDs with the cluster's container instances:

```
aws ecs list-container-instances \
  --profile PROFILE --region REGION --cluster CLUSTER \
  --query 'containerInstanceArns' --output json --no-cli-pager

aws ecs describe-container-instances \
  --profile PROFILE --region REGION --cluster CLUSTER \
  --container-instances CONTAINER_INSTANCE_ARN_1 CONTAINER_INSTANCE_ARN_2 \
  --query 'containerInstances[].{ec2:ec2InstanceId,status:status,reason:statusReason,agent:agentConnected,provider:capacityProviderName,registered:registeredAt}' \
  --output table --no-cli-pager
```

## What each result means

| What you read | Cause | Change |
| --- | --- | --- |
| `desired` equals `max`; every instance registered and full | The group is at its maximum | Raise `MaxSize`, or reduce what the deployment needs at once |
| `scaling.status` is `DISABLED`, or the service has a `launchType` instead of a strategy | Nothing scales the group for these tasks | Turn on managed scaling, or set a capacity provider strategy on the service |
| Task `cpu` or `memory` exceeds the smallest instance type | Tasks excluded from scale-out | Use a separate group and capacity provider sized for these tasks |
| `desired` rose; activities `Failed` or `Cancelled`, or `Launch` suspended | Launches fail or are blocked | Fix the cause the `StatusMessage` names, or resume the process |
| Instances `InService`, missing from the cluster or registered without `provider` | Instances launch but do not register | Check the instance's cluster setting, role and network path |

An instance that registers without a `capacityProviderName` is not counted as this provider's capacity. AWS warns that instances already running in an existing group before it became a capacity provider might not be registered with the provider. [Auto Scaling group capacity providers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html)

For an instance missing from the cluster, three settings decide registration. The agent registers with the cluster named by `ECS_CLUSTER` in `/etc/ecs/ecs.config`, and with no value it joins the `default` cluster. The instance needs a container instance IAM role. Without an internet path, it needs the `ecs-agent`, `ecs-telemetry` and `ecs` interface endpoints in the same Region. If the instance did register but its agent is disconnected, see [the agent guide](/learn/ecs-container-instance-agent-disconnected/). [Agent configuration](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/manually_update_agent.html) · [Container instance role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/instance_IAM_role.html) · [ECS interface endpoints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/vpc-endpoints.html)

## An illustrative fixture

This fixture is fictional. The cluster `orders` uses the capacity provider `orders-cp` with managed scaling on and `targetCapacity` 100, backed by the group `orders-asg`. A deployment of `orders:58` with `maximumPercent` 200 leaves four tasks in `PROVISIONING` at 10:05.

In the first case the group reads `min` 2, `max` 4, `desired` 4, with four `InService` instances, all registered with `provider` `orders-cp` and full of old tasks. The last activity, at 10:01, launched the fourth instance successfully. ECS asked for more and the group has nowhere to go. Raise `MaxSize` to cover the overlap, or lower `maximumPercent` so the deployment needs fewer instances at once.

In the second case the group reads `max` 8 and `desired` 6, with six `InService` instances, and the activities are `Successful`. The cluster lists only four container instances. The two missing instances came from a new launch template version whose user data no longer writes `ECS_CLUSTER=orders`, so they registered in the `default` cluster. Running `list-container-instances --cluster default` shows them there. Restore the user data and replace the two instances.

## Confirm on the replacement

After the change, new instances should appear as `ACTIVE` container instances with `agent` true and `provider` set, the tasks should move from `PROVISIONING` through `PENDING` to `RUNNING`, and `CapacityProviderReservation` should return to `targetCapacity`. Read the group's `desired` against `max` afterwards. If the deployment's peak used the last of the headroom, the next one stops at the same place. [Task lifecycle](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle-explanation.html)

## Where the reading misleads

Scale-out runs in steps. After a step, the group waits for new instances to pass `instanceWarmupPeriod` before the next one, so a large deployment can sit in `PROVISIONING` for several steps without anything being wrong. Read the activity times before you call it stuck. [Cluster auto scaling](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-auto-scaling.html)

Each cluster can hold at most 500 tasks in `PROVISIONING`, a quota that applies only to tasks launched through an Auto Scaling group capacity provider and that many simultaneous deployments can reach. AWS recommends `distinctInstance` as the only placement constraint, because other constraints can stop the scale-out process when they do not match the instances it samples. A warm pool needs `ECS_WARM_POOLS_CHECK=true` in the agent configuration. [ECS quotas](https://docs.aws.amazon.com/general/latest/gr/ecs-service.html) · [Cluster auto scaling](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-auto-scaling.html) · [Warm pools](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html)

For services without a capacity provider, a full cluster leaves a placement event instead of waiting tasks; see [the CPU and memory guide](/learn/ecs-unable-to-place-task-insufficient-resources/). For other layers, see [the signature table](/learn/aws-deployment-failure-signatures/).

## Questions

### Why are my ECS tasks stuck in PROVISIONING?

With an Auto Scaling group capacity provider, tasks wait in `PROVISIONING` until an instance can hold them. If they never move, the group is at its maximum, the capacity provider is not scaling it, its launches fail, or new instances are not registering with the cluster.

### Does ECS managed scaling change the Auto Scaling group's maximum size?

No. Cluster auto scaling changes the group's desired capacity within the minimum and maximum you set, so a group at `MaxSize` cannot add instances for waiting tasks.

### Why do new EC2 instances not join my ECS cluster?

The agent joins the cluster named by `ECS_CLUSTER`, or `default` when it is unset, and it needs a container instance role and a network path to ECS. Find the instance in the `default` cluster or with a disconnected agent before changing the group.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [ECS placement error AGENT: the container agent is disconnected](/learn/ecs-container-instance-agent-disconnected/)
    
    Capacity overruns The Proofline team November 22, 2026 6 min read
    
-   ### [ECS unable to place a task: insufficient CPU or memory on EC2](/learn/ecs-unable-to-place-task-insufficient-resources/)
    
    Capacity overruns The Proofline team November 22, 2026 6 min read
