I'm trying to run an ECS task in AWS using the EC2 launch type. This task has been running for almost a year without problems, but a few weeks ago it stopped working.
When I create a new task, it remains in "provisioning" until it fails. The error I'm getting is "TaskFailedToStart: EMPTY CAPACITY PROVIDER". I have been looking for answers but so far I have found nothing useful. Can anyone help with some ideas of what may be happening?
This is the autoscalling group configuration: autoscalling config
I faced the same issue. In my case the ACL rules attached to the related subnets were too restrictive and somehow EC2, ASG and ECS could not communicated with each other.
Please try - just for debugging - to open the inbound & outbound rules for all. See https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html#default-network-acl
If it works with wide open ACL rules, then you know the root cause and can work on this issue.