Configures autoscaling for the desired count of an ECS service.

Terraform Template

resource "aws_appautoscaling_target" "ecs_target" {
  max_capacity = 4
  min_capacity = 1
  resource_id = "service/${aws_ecs_cluster.example.name}/${aws_ecs_service.example.name}"
  scalable_dimension = "ecs:service:DesiredCount"
  service_namespace = "ecs"
}