ECS Task Failed To Start "Empty Capacity Provider", but EC2 instance is running

0

When deploying a react app to ECS (EC2), I get Task Failed To Start "Empty Capacity Provider". The EC2 instance does get created, so the Autoscaling group did its job. However, it seems the task (deployed as a service) does not recognise that the EC2 instance is running.

I've made sure to give the cluster larger EC2 instances (t3 large) so I can likely rule out under-provisioning. I'm using awsvpc in my task definition for Network Mode.
I havn't created a custom VPC, I'm using the default. I've pulled the image from ECR to docker desktop to verify the react app runs as expected.

Help greatly appreciated

1 Answer
0

The issue with "Empty Capacity Provider" error could be the ECS task is not able to find a suitable Capacity Provider to run the task. Capacity Providers are used by ECS to determine the infrastructure resources (e.g., EC2 instances) that can be used to run your tasks. Make sure, you have properly configured the Capacity Providers for your ECS cluster. By default, ECS should have created an "AUTOSCALING" Capacity Provider for the default VPC. Also review the Auto Scaling configuration for your ECS cluster. Ensure that the Auto Scaling group is properly configured and can scale up the EC2 instances as needed to handle the tasks.

profile pictureAWS
EXPERT
SriniV
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions