Select Language:
If your tasks are stuck in the PROVISIONING stage when using a MANAGED_INSTANCES capacity provider, it usually means that Amazon ECS is struggling to launch the necessary EC2 instances to run your tasks. Here’s how you can troubleshoot and solve this problem:
First, check the permissions of your ECS infrastructure role. Make sure it has the right permissions to perform EC2 actions and pass IAM roles. Confirm the trust relationship is set correctly with ECS, and that the role’s permissions include EC2 access. Looking at CloudTrail logs can help identify if there are permission denials or errors.
Next, review your network setup. Your capacity provider needs to be correctly configured within your Virtual Private Cloud (VPC). Ensure you’ve selected the right subnets and check that:
- Security groups allow the traffic needed for ECS agents.
- The subnets have enough available IP addresses.
- Security groups and subnets are within the same VPC.
- The task’s network configuration (using awsvpc mode) matches the capacity provider setup.
Also, verify your service and instance quotas. If you’ve hit limits for the type of EC2 instances in your region, it can prevent new instances from launching. You might need to request a quota increase, try using different instance types, or free up existing instances by terminating unused ones.
Ensure your task definition is compatible with MANAGED_INSTANCES. Check that:
- The
requiresCompatibilitiesfield is set toMANAGED_INSTANCES. - You’re specifying
awsvpcas the network mode. - The CPU and memory settings are within what the available instances support.
Don’t forget to verify that your capacity provider references a valid EC2 instance profile. This is mandatory for MANAGED_INSTANCES to launch correctly.
Lastly, review the current status of EC2 capacity in your AWS region. Sometimes, regional capacity issues or service disruptions can prevent instances from launching. Using multiple Availability Zones can help improve capacity availability, and retrying the launch after some time might resolve temporary problems.
If these steps don’t resolve the issue, check the detailed error messages in the ECS console or CloudTrail logs. They often contain specific clues about what went wrong. Making these checks can help you identify and fix the problem so your tasks can start successfully.



