Software⏱️ 2 min read📅 2026-06-03

How to Fix: AWS ECS Error when running task: No Container Instances were found in your cluster

Learn how to fix: AWS ECS Error when running task: No Container Instances were found in your cluster.

Quick Answer: Try checking your system settings or restarting.

The 'No Container Instances were found in your cluster' error typically occurs when the ECS Task Definition is not properly registered or configured. There could be a few reasons for this issue, including an invalid task definition, missing container instances, or incorrect service name.

🛑 Root Causes of the Error

  • Invalid task definition: Ensure that your task definition is correctly formatted and includes all necessary parameters.
  • Missing container instances: Verify that you have created a valid container instance in your cluster, as ECS requires at least one running container instance to run tasks.
  • Incorrect service name: Check if the service name in your task definition matches the service name of an existing service in your cluster.

🚀 How to Resolve This Issue

Method 1: Task Definition Validation

  1. Step 1: Validate your task definition using the AWS CLI or SDK to ensure it is correctly formatted and includes all necessary parameters.

Method 2: Verify Container Instances

  1. Step 1: Use the AWS CLI or SDK to check if there are any running container instances in your cluster.

💡 Conclusion

By following these steps, you should be able to resolve the 'No Container Instances were found in your cluster' error and successfully deploy your Docker container image to AWS ECS.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions