ECS services with no Application Auto Scaling target registered
What does ZopNight detect here?
ZopNight flags an Amazon ECS service that has no Application Auto Scaling target, which `application-autoscaling:DescribeScalableTargets` with the `ecs` namespace shows as zero targets for the service. Without one, the task count stays wherever it was last set, so the service pays for peak tasks at quiet times or runs short when traffic climbs.
Signal and threshold
| Field | Value |
|---|---|
| Rule IDs | RC-160 |
| Category | compliance |
| Severity | medium |
| Metric | none — pure configuration read |
| Threshold | 0 scalable targets |
| Source | ZopNight |
| Permissions used | ecs:ListServices · application-autoscaling:DescribeScalableTargets |
Where it applies
A fixed task count in a variable world
An ECS service runs the number of tasks in its desired count. That number moves only if something moves it. ECS service auto scaling uses Application Auto Scaling to do that with target tracking, step scaling, scheduled actions or predictive scaling. On Fargate each task is billed for its vCPU and memory while it runs, so a service pinned at its peak count pays for idle tasks every night, and one pinned low drops requests at the daily high.
Listing which services can scale
Registered services appear as resource IDs such as service/my-cluster/my-service:
aws application-autoscaling describe-scalable-targets --service-namespace ecs \ --query 'ScalableTargets[].[ResourceId,MinCapacity,MaxCapacity]' --output tableCompare that with the services in each cluster:
aws ecs list-services --cluster my-cluster --query 'serviceArns[]' --output textA service missing from the first list has no auto scaling.
What must be true for a finding
ZopNight asks Application Auto Scaling whether the service has at least one scalable target and records the answer. The rule fires only when that answer is explicitly no. There is no utilization threshold; the check is about configuration, not current load.
Services the rule leaves out
If the lookup failed for a service, for example because of a permissions error or a transient throttle, the answer is missing and nothing is raised. A service that has a target registered but no scaling policy attached is not caught by this rule. Services with no tasks at all are covered by ECS Idle Service.
The saving is indirect
The finding reports $0. The effect on the bill comes later, when the task count starts following demand instead of sitting at a hand-picked number.
Adding auto scaling to a service
- Register the service with a minimum and maximum task count:
aws application-autoscaling register-scalable-target --service-namespace ecs --scalable-dimension ecs:service:DesiredCount --resource-id service/my-cluster/my-service --min-capacity 2 --max-capacity 10. - Attach a target tracking policy on
ECSServiceAverageCPUUtilization, or onALBRequestCountPerTargetif the service sits behind a load balancer. - Load test and watch the task count move in both directions.