3

I am trying to create an Cloudformation ECS stack but I keep running through this error.

service XXXX was unable to place a task because no container instance   
met all of its requirements. Reason: No Container Instances were found 
in your cluster. For more information, see the Troubleshooting section.

I used the template cloudformation ECS from amazon webpage. Anyone know how to fix it? Thank you in advance.

  • Possible duplicate of [AWS ECS Error when running task: No Container Instances were found in your cluster](https://stackoverflow.com/questions/36523282/aws-ecs-error-when-running-task-no-container-instances-were-found-in-your-clust) – kenorb Mar 12 '19 at 13:53

2 Answers2

1

Your cluster doesn't have any hosts associated with it most likely. The most straight forward way to confirm this would be to create a new cluster, and specify the existing host to add to it when you create it (this can be automated via user data settings later, but that's a different topic).

Once you create the cluster, you should see your host(s) under the EC2 Instances tab. If you see them, try launching your task again.

MrDuk
  • 16,578
  • 18
  • 74
  • 133
0

Had the same error message in the AWS console and no EC2 instances were being associated with the cluster. Also while it might be a duplicate issue, the resolution is different.

The ecs container agent running on the EC2 was stopped. Docker logs showed an error message about checkpoint file. I didin't copy the error message unfortunately.

ultimately had to delete a file in /var/lib/ directory. I'll update this post with more info.