Skip to main content
ZapStack
Icon-Architecture/48/Arch_Amazon-Elastic-Container-Service_48 Compute

Amazon ECS Cost Optimization

ECS costs depend on whether you use EC2 or Fargate launch type. Fargate charges per vCPU and memory per second, making oversized task definitions expensive at scale. EC2 launch type inherits all the EC2 cost issues. In both cases, teams over-provision CPU and memory in task definitions as a safety margin.

Common ECS cost waste patterns

high impact

Oversized Fargate task definitions

Task definitions requesting more vCPU and memory than containers actually use. Fargate charges per-second for allocated resources whether used or not.

high impact

Running too many tasks

Auto-scaling minimums set too high or services running more tasks than needed for current traffic. Each unnecessary task is a direct cost.

medium impact

Not using Fargate Spot

Workloads that can tolerate interruptions (batch jobs, dev environments) running on regular Fargate instead of Fargate Spot at up to 70% discount.

How to reduce your ECS costs

1

Rightsize Fargate task definitions

Save 20-40% medium

Use Container Insights to see actual CPU and memory utilization per task. Reduce task definition resources to match peak usage with a 20-30% buffer.

2

Tune auto-scaling minimums

Save 20-50% easy

Review minimum task count in your auto-scaling configuration. If your service runs 10 tasks minimum but traffic only needs 4 during off-peak, lower the minimum.

3

Use Fargate Spot for suitable workloads

Save 50-70% medium

Dev environments, batch processing, and CI/CD tasks are good candidates for Fargate Spot. Mix regular and Spot capacity providers for production.

4

Consider Graviton (ARM) tasks

Save 20% medium

Fargate tasks on ARM64 architecture are 20% cheaper than x86. Most containerized applications run without modification on ARM.

How ZapStack finds ECS waste

ZapStack automatically scans your AWS environment and surfaces ECS cost savings you can action immediately.

  • Detects oversized Fargate task definitions
  • Identifies services with excess running tasks
  • Flags workloads suitable for Fargate Spot
  • Recommends Graviton migration for cost reduction
  • Calculates per-service savings from rightsizing

Frequently asked questions about ECS costs

How much are you overspending?

Find out in less than 5 minutes. No credit card, no commitment.