ECS cost model beyond compute: the checklist that prevents surprise bills
ECS cost surprises usually happen when teams budget only for compute (EC2 instance-hours or Fargate vCPU/GB-hours). In real services, the big costs often come from load balancers, logs, and networking. Use this checklist to build a more accurate total cost model.
1) Compute (baseline)
- ECS on Fargate: vCPU-hours + memory GB-hours (running tasks).
- ECS on EC2: instance-hours (plus EBS if you attach volumes).
- Idle capacity: the difference between peak and average matters more than list price.
2) Load balancers (baseline + capacity)
- Hourly baseline per ALB/NLB.
- Capacity units driven by connections, throughput, and rule evaluations.
- Multiple quiet services can still create a large baseline if each has its own load balancer.
3) Logs and metrics (often bigger than compute)
- Log ingestion is proportional to request volume and verbosity.
- Retention creates a steady GB-month storage baseline.
- Query scan costs spike during incidents and heavy dashboards.
- Metrics costs grow with custom metric cardinality and dashboard polling.
4) Networking (NAT, egress, cross-AZ)
- NAT gateway: hourly + GB processed can spike for fleets pulling images and package updates.
- Internet egress: downloads, external APIs, public traffic.
- Cross-AZ transfer: chatty microservices and uneven target placement.
5) Storage (EBS and snapshots)
- If you run ECS on EC2 and attach volumes, include EBS GB-month and performance settings.
- Model snapshots separately: change rate × retention is the key driver.
6) Container registry behavior (ECR is not just storage)
- Storage grows with retention and CI push frequency.
- Pull traffic spikes during cluster scaling and cold starts.
- Cross-region pulls and NAT paths can change transfer costs materially.
7) Put it together (sum line items)
- Pick compute model (Fargate vs EC2) and estimate average monthly capacity.
- Add load balancer baseline and estimate capacity units.
- Add logs (ingestion + retention) and validate verbosity assumptions.
- Add networking (NAT/egress/cross-AZ) for the real traffic paths.
- Add storage (EBS + snapshots) and registry behavior (ECR storage + pulls) where relevant.
Validation checklist
- Validate average (not peak) running tasks/instances for a representative week.
- Validate log ingestion GB/day and retention settings for the service.
- Validate NAT processed GB and egress GB for the service traffic paths.
- Validate how many load balancers exist and whether they are “shared” or “one per service”.
Sources
- ECS pricing: aws.amazon.com/ecs/pricing
- Fargate pricing: aws.amazon.com/fargate/pricing
Related guides
EC2 cost estimation: a practical model (compute + the hidden line items)
A practical EC2 cost estimation guide: model instance-hours with uptime and blended rates, then add the hidden line items that often dominate (EBS, snapshots, load balancers, NAT/egress, logs).
ECS vs EKS cost: a practical checklist (compute, overhead, and add-ons)
Compare ECS vs EKS cost with a consistent checklist: compute model, platform overhead, scaling behavior, and the line items that often dominate (load balancers, logs, data transfer).
EKS pricing: what to include in a realistic cost estimate
A practical EKS pricing checklist: nodes, control plane, load balancers, storage, logs/metrics, and data transfer — with calculators to estimate each part.
Kubernetes cost model beyond nodes: the checklist most teams miss
A practical Kubernetes cost model checklist: control plane, load balancers, storage, logs/metrics, and egress - plus links to calculators to estimate each part.
AWS Fargate pricing (cost model + pricing calculator)
A practical Fargate pricing guide and calculator companion: what drives compute cost (vCPU-hours + GB-hours), how to estimate average running tasks, and the non-compute line items that usually matter (logs, load balancers, data transfer).
ECS autoscaling cost pitfalls (and how to avoid them)
A practical guide to ECS autoscaling cost pitfalls: noisy signals, oscillations, retry storms, and the non-compute line items that scale with traffic (logs, NAT/egress, load balancers).
Related calculators
Data Egress Cost Calculator
Estimate monthly egress spend from GB transferred and $/GB pricing.
API Response Size Transfer Calculator
Estimate monthly transfer from request volume and average response size.
VPC Data Transfer Cost Calculator
Estimate data transfer spend from GB/month and $/GB assumptions.
Cross-region Transfer Cost Calculator
Estimate monthly cross-region transfer cost from GB transferred and $/GB pricing.
Log Cost Calculator
Estimate total log costs: ingestion, storage, and scan/search.
Log Ingestion Cost Calculator
Estimate monthly log ingestion cost from GB/day or from event rate and $/GB pricing.
FAQ
Why is compute-only a bad ECS estimate?
Because ECS bills often include large non-compute line items: ALB/NLB baseline and capacity units, log ingestion and retention, NAT gateway processed traffic, and internet egress.
What line item is most commonly underestimated?
Logs and networking. Verbose services can generate large ingestion and retention costs, and container fleets can generate substantial NAT processed traffic (image pulls, updates, external APIs).
Last updated: 2026-01-27