Supason Kotanut
Supason Kotanut

Reputation: 91

Cloudformation failed to create ecs service (No Container Instances were found in your cluster.)

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.

Upvotes: 3

Views: 2483

Answers (2)

user3577138
user3577138

Reputation: 15

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.

Upvotes: 0

MrDuk
MrDuk

Reputation: 18242

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.

Upvotes: 1

Related Questions