We utilise ASG for auto scaling of EC2 instances, but they do not coordinate upgrades with ECS, thus instances are upgraded randomly and services may experience downtime (all replicas may go down as their instances can be upgraded at the same time). We need to utilise ECS capacity provider to coordinate the upgrades and also provision new EC2s if running low on resources.
We utilise ASG for auto scaling of EC2 instances, but they do not coordinate upgrades with ECS, thus instances are upgraded randomly and services may experience downtime (all replicas may go down as their instances can be upgraded at the same time). We need to utilise ECS capacity provider to coordinate the upgrades and also provision new EC2s if running low on resources.
See https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_capacity_provider