Provider comparison · Updated 2026-09-20
Lambda vs EC2 vs Fargate Cost Comparison
Side-by-side pricing including compute, egress, storage, load balancer, managed database, and the hidden costs that don't show up in basic estimates. All prices are on-demand, monthly, in USD.
Compute pricing (on-demand, monthly)
Egress cost - the surprise bill item
Data transferred out to the internet per month.AWS free tier: 100GB/month. After that: $0.09/GB.
Managed services pricing
S3 Standard. Request pricing adds up fast.
ALB: $0.008/hour + LCU charges. Often $15-25/month for typical traffic.
RDS PostgreSQL. Multi-AZ doubles the cost.
Hidden costs to watch for
Required for private subnet instances to reach the internet. $0.045/hour + $0.045/GB processed.
How to avoid: Use VPC endpoints for AWS services. Put dev workloads in public subnets. Or switch to a provider that does not charge for this.
$0.01/GB each way between Availability Zones. Multi-AZ setups silently double your data transfer costs.
How to avoid: Co-locate services in the same AZ for dev. Use endpoint services to reduce cross-AZ calls.
$0.09/GB out after 100 GB free. APIs serving large payloads or media can generate hundreds in egress fees.
How to avoid: Use CloudFront (first 1 TB/month free). Or switch to DigitalOcean with included bandwidth.
Multi-AZ RDS doubles your database cost. Many developers enable this in production without realizing the cost impact.
How to avoid: Use single-AZ for dev/staging. Consider managed Postgres alternatives like Neon or Supabase.
$0.50/GB ingested + $0.03/GB stored/month. High-traffic apps with verbose logging can spend $50-200/month just on logs.
How to avoid: Set log retention policies. Use log sampling. Or export to S3 and use Athena instead.
Required for private subnet instances to reach the internet. $0.045/hour + $0.045/GB processed.
How to avoid: Use VPC endpoints for AWS services. Put dev workloads in public subnets. Or switch to a provider that does not charge for this.
$0.01/GB each way between Availability Zones. Multi-AZ setups silently double your data transfer costs.
How to avoid: Co-locate services in the same AZ for dev. Use endpoint services to reduce cross-AZ calls.
$0.09/GB out after 100 GB free. APIs serving large payloads or media can generate hundreds in egress fees.
How to avoid: Use CloudFront (first 1 TB/month free). Or switch to DigitalOcean with included bandwidth.
Multi-AZ RDS doubles your database cost. Many developers enable this in production without realizing the cost impact.
How to avoid: Use single-AZ for dev/staging. Consider managed Postgres alternatives like Neon or Supabase.
$0.50/GB ingested + $0.03/GB stored/month. High-traffic apps with verbose logging can spend $50-200/month just on logs.
How to avoid: Set log retention policies. Use log sampling. Or export to S3 and use Athena instead.
Calculate for your specific workload
The numbers above are for reference. Plug in your actual requirements to get a real cost estimate.
Open calculator