Description
Review an ECS REPLICA service’s DesiredCount together with its rolling-deployment settings. Omitting DeploymentConfiguration uses defaults; omission does not itself mean zero running tasks.
Potential impact
Failure to retain the required tasks can interrupt request handling. A count of zero can be appropriate for an intentional service shutdown.
Remediation
Set the required DesiredCount, and align rolling-deployment MinimumHealthyPercent and MaximumPercent with available capacity. Check actual task health as well.
Examples
These excerpts target one task with room for rolling replacement. The settings alone do not guarantee healthy execution or zero downtime; define Cluster and TaskDefinition separately.
Before
Resources:
Service:
Type: AWS::ECS::Service
Properties:
Cluster: !Ref Cluster
TaskDefinition: !Ref TaskDefinition
DesiredCount: 0
After
Resources:
Service:
Type: AWS::ECS::Service
Properties:
Cluster: !Ref Cluster
TaskDefinition: !Ref TaskDefinition
DesiredCount: 1
DeploymentConfiguration:
MinimumHealthyPercent: 100
MaximumPercent: 200