- Newest
- Most votes
- Most comments
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.
Make sure you are using the right cluster name in the launch template used by ecs autoscaling group in the userdata:
#!/bin/bash
cat <<'EOF' >> /etc/ecs/ecs.config
ECS_CLUSTER=${var.cluster_name}
ECS_LOGLEVEL=debug
ECS_ENABLE_TASK_IAM_ROLE=true
Relevant content
- asked a year ago
- AWS OFFICIALUpdated a month ago
