Dev and test Fargate services that could move to Fargate Spot safely
What does ZopNight detect here?
Fargate Spot cuts up to 70% off on-demand Fargate rates, but a reclaim arrives with about 2 minutes of notice. ZopNight recommends the switch only for dev/test-named services running at least 2 tasks behind a load balancer, and prices the saving from live tier rates, never a flat fraction.
Signal and threshold
| Field | Value |
|---|---|
| Rule IDs | RC-159 |
| Category | discount |
| Severity | low |
| Metric | none — pure configuration read |
| Source | ecs_spot_fargate.go |
Where it applies
Interruption tolerance is the axis, not utilization
AWS reclaims Fargate Spot capacity on roughly 2 minutes’ notice. Whether a workload survives that has nothing to do with how busy its CPU is. Utilization questions belong to the rightsizing rules. What this rule asks is narrower: is the service discretionary (a dev, test, qa, staging, or sandbox name, and nothing production-flavoured about it), is it actually launched on Fargate per the discovered launch type, and can it prove it tolerates losing a task mid-flight?
Two tasks and a load balancer as the safety bar
Tolerance is required as evidence, not assumed from the environment name. The service must run a desired count of at least 2, so a reclaim leaves at least 1 task serving, and it must sit behind a load balancer with registered targets, so traffic reroutes around the reclaimed task while its replacement starts. A single-task QA service on Spot turns every reclaim into an outage for a team that is actively using it. Those services abstain here, and their honest adoption path is a mixed capacity-provider strategy with an on-demand base, which this rule does not model and will not pretend to.
Live Spot rates or no recommendation
The dollar figure is derived from live on-demand versus Spot tier rates for the service’s actual SKU, supplied by the billing pipeline. When live rates are absent the rule abstains instead of falling back to a hardcoded fraction. The ~70% you see in AWS marketing copy is the ceiling AWS quotes for Fargate Spot, not a measured saving. A missing or zero-priced monthly cost also abstains.
Confirming the launch type and task count
aws ecs describe-services --cluster dev-cluster --services my-service \ --query 'services[0].{launchType:launchType,desired:desiredCount,loadBalancers:loadBalancers}'The rule’s firing shape is launchType FARGATE, desired of 2 or more, and a non-empty
loadBalancers list, on a service whose name reads dev/test.
Adopting FARGATE_SPOT with a fallback
Switch the service’s capacity provider strategy to FARGATE_SPOT as primary and keep plain FARGATE as a weighted fallback, so steady-state capacity survives a Spot drought. Then watch task stop reasons for a week: occasional reclaims are the deal you signed up for, but frequent ones on a latency-sensitive test suite mean the base weight needs raising.