For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/ansible/aws/ecs_service_without_running_tasks.md.
A documentation index is available at /llms.txt.
ECS services must define a deployment configuration to avoid deployments or scaling events from temporarily leaving zero tasks running, which can cause application downtime and loss of availability.
For Ansible ECS tasks using the community.aws.ecs_service or ecs_service modules, the deployment_configuration property must be present and include the minimum_healthy_percent and maximum_percent keys. Resources missing deployment_configuration or missing either minimum_healthy_percent or maximum_percent are flagged. This rule checks for the presence of those keys and does not validate numeric ranges. Ensure minimum_healthy_percent is set so at least one task remains running during deployments according to your desired task count.