Search code examples
amazon-web-servicesdockeramazon-ec2amazon-ecs

EC2 instances not created while creating ECS cluster


I created an ECS cluster, that contains two EC2 instances of t3.nano type. Now I need to create another one within the same account and the same region, but with different instance types.

The problem is that the cluster is created, but EC2 instances are not. I'm creating the cluster via AWS ECS console. Instances of the first cluster were successfully created via ECS console too. I'm launching them in public subnets, so that ECS agent could reach the cluster, but it's not that EC2 instances can't register within the cluster, it's that they are not even created, even though the very cluster is successfully created.

What am I doing wrong?


Solution

  • This sounds like you have chosen the wrong cluster template. If you choose Networking Only (Fargate) template, there will be no instance created since Fargate is serverless solution where you don't manage its underlying EC2 container instances.

    Another thing is that you might have reached the default soft limit on the number of instances that you can run within a single region, which is 20, but you should see an error telling you that. Or it may be that there is not enough on-demand EC2 capacity in AZs where you are launching your cluster but this is highly unlikely and again, there should be some error informing you about that fact.