How Much Do AWS Dev Environments Really Cost?
Cost Explorer tells you that you spent $18,427 this month. It doesn't tell you which of your 30 dev environments burned $600 idling through the weekend, which staging cluster hasn't been deployed to since March, or why the “ECS” line item is $12k while your services run on 0.5 vCPU. The math nobody shows you — and how to see it for yourself — is below.
- ·One ECS Fargate dev environment costs ~$234/mo: $144 compute + $90 fixed overhead.
- ·Fixed overhead (ALB ~$22/mo, NAT ~$32/mo, CloudWatch ~$36/mo) burns even when tasks are stopped.
- ·20 dev environments × $90 overhead = $1,800/mo invisible in Cost Explorer.
- ·Scheduling + Fargate Spot cuts compute by 60–90% — overhead stays, so be honest about the range.
- ·Tag your environments now — Terraform snippet below.
Add these tags to every ECS cluster and service. Enable them in AWS Billing → Cost Allocation Tags. Wait 24 hours. Run the query below. You now have per-environment costs.
# In your Terraform ECS module
resource "aws_ecs_cluster" "this" {
name = var.cluster_name
setting {
name = "containerInsights"
value = "enabled"
}
}
resource "aws_ecs_service" "app" {
for_each = var.services
cluster = aws_ecs_cluster.this.id
propagate_tags = "SERVICE"
tags = {
Environment = var.env_name # "dev", "staging", "prod"
Team = var.team # "platform", "backend"
CostCenter = var.cost_center # "engineering"
}
}Once tags propagate, query Cost Explorer:
aws ce get-cost-and-usage \
--time-period Start=2026-05-01,End=2026-06-01 \
--granularity MONTHLY \
--filter '{"Tags": {"Key": "Environment", "Values": ["dev", "staging"]}}' \
--metrics UnblendedCost \
--group-by Type=TAG,Key=EnvironmentThe bill line item nobody can quote
Every ECS environment carries $85-100/month in fixed overhead — ALB, NAT Gateway, and CloudWatch logs — that burns 24/7 regardless of whether any containers are running.
Scheduling cuts compute cost by 60-70% but fixed overhead remains. At 12 environments, that overhead is $1,000+/month even with perfect scheduling. The only way to eliminate it: consolidate non-prod environments onto shared ALBs (host-based routing) and drop NAT for dev with public subnet placement.
Most teams know their total AWS bill — almost none can quote what a single dev environment costs. The gap between 'monthly account spend' and 'per-environment cost' is where money leaks.
Open the AWS Billing Console. You'll see EC2, RDS, Data Transfer— service-level line items. Not environments. Not teams. Not “staging.”
Cost Explorer adds dimensions like Region and Linked Account. Still no environments. Cost Allocation Tags cansolve this — but only if you've tagged every ECS service, cluster, ALB, and NAT Gateway. Most teams haven't.
The result: your CTO asks “what does our staging environment cost?” and you can't answer. You can quote the ECS line item. You can't quote the environment.
The obvious cost: compute
ECS Fargate compute costs vCPU × $0.04048 + GB × $0.00444 per hour; a typical 8-service dev env at 0.5 vCPU/1 GB running 24/7 costs $144/month in compute alone. Multiply by services and environments — that's the number you know.
This is the part everyone gets right. Fargate charges per vCPU-second and GB-second. The math is straightforward:
services × (vCPU × $0.04048 + GB × $0.004445) × 730 hours
For a typical dev environment with 8 services at 0.5 vCPU / 1 GB running 24/7:
8 × (0.5 × $0.04048 + 1 × $0.004445) × 730 = $144/mo
That's the compute portion. If you stop every task in this environment — schedule it to zero hours — this number goes to $0. Easy. But you don't pay only for compute. Read the full cost optimization breakdown for every lever including Spot and right-sizing.
The invisible cost: fixed overhead per environment
Every ECS Fargate environment carries $85-100/month in fixed overhead — ALB ($22), NAT Gateway ($32), CloudWatch ($36) — that persists even when all tasks are stopped.
“Every environment needs its own ALB, NAT Gateway, and CloudWatch log groups. These costs are flat — they don't go away when you stop tasks at night.”
— Verified on live ECS production deployment, June 2026
Every environment pays ~$85-100/mo before any containers run: ALB ($22), NAT Gateway ($33-66), CloudWatch ($3-15). This is the cost nobody budgets for — and it doesn't scale down at night.
Every ECS environment — whether it runs 20 tasks or zero — carries three fixed costs that never go away:
Base charge of $0.0225/hr. You pay this even with zero traffic and zero healthy targets. Plus LCU charges for actual traffic.
$0.045/hr per AZ. Every private subnet that reaches the internet (ECR pulls, API calls) goes through a NAT Gateway. Most setups have at least one per environment.
$0.50/GB ingested + $0.03/GB-month stored. Even idle services write logs — health checks, ECS agent output, container stdout.
That's ~$90/mo per environment — before any task runs. For 20 dev environments, you're paying $1,800/mo in overhead alone. Stop every task, and the bill drops by $2,880/mo (the compute), not by $4,680/mo. The $1,800 overhead floor doesn't move.
This is why honest cost optimization tools don't claim 90% savings. Scheduling cuts compute — not infrastructure. The 60–70% range you see on this site is compute-only, verified against published AWS rates. The overhead floor is real and gets proportionally larger as environments shrink: a 2-service dev env might be $36 compute + $90 overhead — the overhead is 71% of the cost.
What 10, 20, and 50 dev environments cost
10 dev environments cost $2,340/mo, 20 cost $4,680/mo, and 50 cost $11,700/mo — assuming 8 services at 0.5 vCPU/1 GB running 24/7 with $90 overhead per env. Scheduling cuts compute by 60-70% — the fixed overhead remains but the total drops dramatically.
All scenarios assume 8 services per env, 0.5 vCPU, 1 GB, 24/7 on-demand. Overhead is ~$90 per environment.
| Environments | Compute | Overhead | Total |
|---|---|---|---|
| 10 | $1,440/mo | $900/mo | $2,340/mo |
| 20 | $2,880/mo | $1,800/mo | $4,680/mo |
| 50 | $7,200/mo | $4,500/mo | $11,700/mo |
At 20 environments, you're spending $4,680/month. $1,800 of that is overhead — money that burns regardless of whether anyone deploys or even logs in. That's also around the scale where multi-environment strategy starts breaking — naming conventions drift, IAM roles proliferate, and the per-environment overhead compounds.
Start seeing per-environment costs today
Tag every ECS cluster and service with Environment, Team, and CostCenter, activate cost allocation tags in AWS Billing, then query Cost Explorer — you get per-environment cost in under 5 minutes. It won't capture fixed overhead perfectly — but it's 80% of the visibility in 5 minutes. Better than the total bill you have today.
You don't need a new tool. You need tags, consistently applied, and Cost Explorer configured to read them.
Tag every ECS cluster and service
Use the Terraform snippet above. Minimum keys: Environment, Team, CostCenter.
Enable cost allocation tags
AWS Billing Console → Cost Allocation Tags → select your tag keys → Activate. Takes up to 24 hours to propagate.
Query Cost Explorer by tag
Run the AWS CLI command from the ready-to-use block above. Group by Environment tag key.
Set a budget alert
AWS Budgets → Create budget → Cost budget → filter by Environment tag → alert at 80% of expected monthly cost.
Cut the compute, accept the overhead
Scheduling dev environments to business hours (Mon-Fri 9am-7pm) cuts compute by 70%; combine with Fargate Spot for another 70% off compute — but the $90/env fixed overhead floor stays. Consolidate non-prod onto shared ALBs (host-based routing) and drop NAT for dev environments with public subnet placement to eliminate it.
Once you can see per-environment costs, you can act. Two levers work on compute. Neither touches overhead:
- ·Environment scheduling. Run dev/staging only during business hours (Mon–Fri 9am–7pm = 50 hrs/wk = 29.8% of 24/7). Compute drops 70%.
- ·Fargate Spot. Run interrupt-tolerant dev tasks on spare capacity. Up to 70% off on-demand — stacks with scheduling.
For the 20-environment scenario:
Scheduling: $2,880 compute × 29.8% remaining time = $858. Spot on dev tasks: $858 × 30% = $257. Fixed overhead floor: $1,800 (ALB + NAT GW — can't be scheduled away). Total: $2,057/mo.
The overhead — that $1,800/mo for 20 envs — is the floor. It's why we say “60–70%” for scheduling, not “90%.” The math is defensible. Anyone who claims they can eliminate the ALB, the NAT Gateway, and the CloudWatch ingest from your AWS bill is lying.
If your tasks only talk to AWS services within the same region, use VPC Endpoints (Gateway Endpoints for S3 and DynamoDB are free). But most real environments pull from ECR, call external APIs, or need outbound internet — so you'll have at least one NAT Gateway per VPC. You can share one NAT GW across multiple environments in the same VPC, which brings the overhead per environment down significantly.
Yes. RDS instances are not covered here — this article focuses on ECS Fargate compute + networking overhead. RDS adds its own floor: a db.t4g.micro costs ~$12/mo, a db.r6g.large ~$200/mo. If you have one RDS instance per environment, multiply accordingly. Aurora Serverless v2 can help reduce idle database cost.
Query CloudWatch for CPU utilization over 30 days. Any environment with <1% average CPU and zero deployments in that window is a candidate. Check the last deployment timestamp in ECS (describe-services shows createdAt and deployment rollouts). Cross-reference with your team — someone always says 'we might need that one.'
FAQ
The numbers in this post are estimates. Run the Fleet Audit against your actual ECS fleet and get your real figure in 15 minutes.
If you read this, you might also want to know
How do I schedule my dev environments to stop at night?
Use EventBridge Scheduler to set ECS service desired count to 0 at 7pm and back to N at 8am. On Fargate, billing stops instantly. The fixed overhead (ALB, NAT Gateway) remains. For a 10-environment team, this typically saves $800-1,500/mo.
What's the cheapest way to run dev environments on AWS?
Three levers: (1) schedule them off outside business hours, (2) use Fargate Spot for dev workloads (~70% discount), (3) share ALBs across non-prod environments. Combined, these can reduce dev environment costs by 80-90%.
How do I track AWS costs per developer or team?
Tag every ECS resource with team and envname at provisioning time. Use a naming convention that encodes environment in every resource. Filter Cost Explorer by tags. For untaggable resources like NAT Gateway, attribute proportionally.
Let's break down your AWS bill — for real.
Run the free AI audit in 5 minutes — it reads your AWS, counts what's running idle, and shows you the per-environment breakdown your Cost Explorer can't.
Every inquiry reviewed by a Fortem engineer. Response within 4 hours, weekdays.