COMPREHENSIVE GUIDE

Complete Guide to AWS Cost Optimization for SaaS Companies

How to reduce your AWS bill by 30-60% without sacrificing performance or reliability. Practical strategies from 20 years of building enterprise SaaS on AWS.

πŸ“– 25 min read β€’ Last updated: February 2026

1. Introduction: Why SaaS Cost Optimization is Different

If you're running a multi-tenant SaaS application on AWS, you've probably noticed something frustrating: generic cost optimization advice doesn't quite fit. The standard "turn off unused instances" guidance assumes you have idle resources. But SaaS companies face a different challenge β€” your infrastructure scales with customer usage, and the relationship between revenue and AWS costs isn't always linear.

After 20 years building enterprise applications β€” including 9 years at companies in healthcare and financial services where every dollar of cloud spend gets scrutinized β€” I've developed a framework for SaaS cost optimization that goes beyond the basics.

The SaaS Cost Optimization Goal

Reduce your cost-per-customer while maintaining (or improving) performance and reliability. Not just cutting spend β€” improving unit economics.

This guide covers everything from quick wins you can implement this week to architectural patterns that pay dividends for years. I'll link to deeper dives on specific topics where relevant.

What you'll learn:

  • How to find the 20% of resources causing 80% of your costs
  • When Reserved Instances beat Savings Plans (and vice versa)
  • Serverless cost patterns that actually work at scale
  • Database optimization strategies for multi-tenant workloads
  • Network cost traps and how to avoid them
  • Building a cost-aware culture without slowing down development

2. Quick Wins: What to Do This Week

Before diving into architectural changes, let's capture the low-hanging fruit. These optimizations typically take less than a day to implement and can reduce your bill by 10-20% immediately.

2.1 Enable Cost Allocation Tags

You can't optimize what you can't measure. If you haven't already, enable cost allocation tags for at least these dimensions:

  • Environment (production, staging, development)
  • Service (api, worker, frontend)
  • Team (if you have multiple teams)
  • Customer (for dedicated resources)

2.2 Delete Unattached EBS Volumes

This is almost always free money. When EC2 instances are terminated, their EBS volumes often persist. Run this in each region:

aws ec2 describe-volumes --filters Name=status,Values=available \
  --query 'Volumes[*].{ID:VolumeId,Size:Size,Created:CreateTime}' \
  --output table

2.3 Review Elastic IP Addresses

Unattached Elastic IPs cost $3.60/month each. Small, but they add up β€” and they're a sign of infrastructure drift.

2.4 Check for Idle Load Balancers

ALBs cost ~$16/month minimum even with zero traffic. Check CloudWatch for load balancers with consistently zero requests.

2.5 Enable S3 Intelligent-Tiering

For buckets with unpredictable access patterns, Intelligent-Tiering automatically moves objects between access tiers. No retrieval fees, minimal monitoring cost. This is almost always worth enabling for application data buckets.

Related Reading

For a deeper dive on these strategies, see AWS Cost Optimization Strategies.

3. Commitment Discounts: Reserved Instances vs. Savings Plans

Commitment-based discounts are the single biggest lever for reducing AWS costs β€” typically 30-60% off on-demand pricing. But choosing between Reserved Instances (RIs) and Savings Plans requires understanding your workload patterns.

3.1 When to Use Savings Plans

Compute Savings Plans are the most flexible option. They apply automatically to EC2, Fargate, and Lambda usage across any region, instance family, or OS. Use these when:

  • You're still evolving your architecture (instance types may change)
  • You use a mix of EC2, ECS/Fargate, and Lambda
  • You want "set it and forget it" simplicity

EC2 Instance Savings Plans offer deeper discounts (up to 72%) but lock you to a specific instance family in a specific region. Use these for stable, predictable workloads.

3.2 When Reserved Instances Still Win

RIs aren't dead. They still make sense for:

  • RDS databases β€” RDS Reserved Instances offer 30-60% savings and there's no Savings Plan equivalent
  • ElastiCache β€” Same story, RIs are your only commitment option
  • OpenSearch/Elasticsearch β€” Reserved Instances available
  • Redshift β€” Reserved Nodes for data warehouse workloads

3.3 The Coverage Strategy

Don't try to cover 100% of your usage with commitments. A good target is 70-80% coverage of your baseline (minimum) usage. This leaves room for:

  • Traffic spikes and seasonal variation
  • New feature launches
  • Architecture changes

πŸ’‘ Pro Tip

Use AWS Cost Explorer's "Savings Plans Recommendations" with a 7-day lookback for aggressive coverage, or 30-day for conservative. Start conservative and increase coverage quarterly.

4. Compute Optimization: Right-Sizing and Architecture

Right-sizing is the process of matching your instance types to actual workload requirements. AWS Compute Optimizer provides recommendations, but understanding the "why" helps you make better decisions.

4.1 The Right-Sizing Process

  1. Collect metrics β€” CPU, memory, network, and disk I/O over at least 2 weeks (ideally a month)
  2. Identify patterns β€” Is usage consistent or spiky? What's the P95 vs. average?
  3. Target 60-70% utilization β€” This leaves headroom for spikes without over-provisioning
  4. Consider Graviton β€” ARM-based instances are 20% cheaper with often better performance

4.2 Graviton: The Easy Win

AWS Graviton processors (ARM64) offer 20% lower cost and often 20-40% better performance for many workloads. If you're running:

  • .NET 6+ applications β€” fully supported on ARM64
  • Node.js, Python, Go, Rust β€” excellent ARM support
  • Containerized workloads β€” just rebuild for ARM

The migration is usually straightforward. For .NET, it's often just changing the runtime identifier in your build.

4.3 Spot Instances for Fault-Tolerant Workloads

Spot instances offer 60-90% discounts but can be interrupted with 2 minutes notice. Good candidates:

  • Batch processing and data pipelines
  • CI/CD build agents
  • Development/test environments
  • Stateless workers in an auto-scaling group (mixed with on-demand)

5. Serverless Cost Patterns

Serverless can be incredibly cost-effective β€” or surprisingly expensive. The difference comes down to understanding the pricing model and designing accordingly.

5.1 Lambda Cost Optimization

Lambda charges for GB-seconds (memory Γ— duration). The optimization levers:

  • Memory tuning β€” More memory = more CPU = often faster execution. Test to find the sweet spot where cost (memory Γ— time) is minimized.
  • Cold start reduction β€” Provisioned Concurrency costs money but eliminates cold starts. Use for latency-sensitive paths only.
  • ARM64 (Graviton2) β€” 20% cheaper and often faster. For .NET, use linux-arm64 runtime.
  • AOT compilation β€” .NET 8 Native AOT dramatically reduces cold starts and memory usage.
  • Duration optimization β€” Lambda bills per 1ms (since 2020), so even small performance improvements translate directly to cost savings.

Deep Dive

See Serverless Optimization Patterns for detailed Lambda tuning strategies including memory profiling and AOT compilation.

5.2 API Gateway Costs

API Gateway pricing varies dramatically by type:

  • REST API β€” $3.50 per million requests + data transfer
  • HTTP API β€” $1.00 per million requests (70% cheaper!)
  • WebSocket API β€” $1.00 per million messages + connection minutes

If you don't need REST API features (request validation, usage plans, API keys), HTTP API is almost always the right choice.

5.3 When Serverless Gets Expensive

Serverless isn't always cheaper. Watch out for:

  • High-throughput, consistent workloads β€” At ~1M requests/day with consistent traffic, containers often win
  • Long-running processes β€” Lambda's 15-minute limit means you're paying for the full duration of long tasks
  • Memory-intensive workloads β€” Lambda maxes at 10GB; if you need more, containers or EC2 are your only option anyway

6. Database Cost Strategies

Databases are often the largest line item on a SaaS AWS bill. The optimization strategy depends heavily on your database choice.

6.1 RDS Optimization

  • Reserved Instances β€” 30-60% savings for production databases. No-brainer for stable workloads.
  • Right-size aggressively β€” Most RDS instances are over-provisioned. Check Performance Insights.
  • Aurora Serverless v2 β€” Scales to zero (almost). Great for dev/test and variable workloads.
  • Read replicas β€” Offload read traffic, but remember they cost money too.

6.2 DynamoDB Cost Optimization

DynamoDB pricing is based on read/write capacity units (RCUs/WCUs) and storage. Key strategies:

  • On-demand vs. Provisioned β€” On-demand is ~6x more expensive per request but has no capacity planning. Use provisioned with auto-scaling for predictable workloads.
  • Reserved Capacity β€” Available for provisioned mode, offers significant discounts.
  • Single-table design β€” Reduces the number of tables and simplifies capacity management.
  • TTL for expiring data β€” Free deletes for data you don't need to keep.

Related Reading

For DynamoDB design patterns, see DynamoDB Single-Table Design.

6.3 Caching to Reduce Database Costs

A well-implemented cache can reduce database costs by 50-80%:

  • ElastiCache (Redis/Valkey) β€” Great for session data, API responses, computed results
  • DynamoDB DAX β€” Microsecond latency for DynamoDB reads, but adds cost
  • CloudFront β€” Cache API responses at the edge for read-heavy APIs

7. Storage Optimization

S3 storage costs are usually manageable, but data transfer and request costs can surprise you.

7.1 S3 Storage Classes

Match storage class to access patterns:

  • S3 Standard β€” Frequently accessed data
  • S3 Intelligent-Tiering β€” Unknown or changing access patterns (recommended default)
  • S3 Standard-IA β€” Infrequent access, but immediate retrieval needed
  • S3 Glacier Instant Retrieval β€” Archive with millisecond access
  • S3 Glacier Deep Archive β€” Cheapest storage, 12-hour retrieval

7.2 Lifecycle Policies

Automate transitions between storage classes:

{
  "Rules": [{
    "ID": "ArchiveOldLogs",
    "Status": "Enabled",
    "Filter": { "Prefix": "logs/" },
    "Transitions": [
      { "Days": 30, "StorageClass": "STANDARD_IA" },
      { "Days": 90, "StorageClass": "GLACIER" }
    ],
    "Expiration": { "Days": 365 }
  }]
}

7.3 EBS Optimization

  • gp3 vs gp2 β€” gp3 is 20% cheaper with configurable IOPS/throughput. Migrate existing gp2 volumes.
  • Snapshot lifecycle β€” Delete old snapshots. Use AWS Backup with retention policies.
  • Right-size volumes β€” You can increase EBS size but not decrease. Start smaller.

8. Network & Data Transfer Costs

Data transfer is the hidden cost that catches many SaaS companies off guard. Understanding the pricing model is essential.

8.1 Data Transfer Pricing Basics

  • Inbound β€” Free (data into AWS)
  • Outbound to internet β€” $0.09/GB (first 10TB), decreasing with volume
  • Cross-region β€” $0.02/GB (both directions)
  • Cross-AZ β€” $0.01/GB (both directions) β€” this adds up!
  • Same-AZ β€” Free (using private IPs)

8.2 Common Data Transfer Traps

⚠️ Watch Out

  • β€’ NAT Gateway charges $0.045/GB processed β€” can be huge for high-traffic apps
  • β€’ VPC endpoints eliminate NAT costs for AWS services (S3, DynamoDB, etc.)
  • β€’ Cross-AZ traffic from load balancers to targets adds up quickly
  • β€’ CloudWatch Logs data ingestion: $0.50/GB

8.3 Reducing Data Transfer Costs

  • Gateway VPC Endpoints β€” S3 and DynamoDB gateway endpoints are free and eliminate NAT Gateway costs for those services. No-brainer.
  • Interface VPC Endpoints β€” Other AWS services use interface endpoints, which cost ~$7.30/month per AZ plus $0.01/GB processed. For low-traffic services, this can exceed NAT Gateway costs. However, they're non-negotiable for isolated/private subnet architectures where NAT isn't an option.
  • CloudFront β€” Often cheaper than direct S3/ALB egress, plus better performance.
  • Compression β€” Gzip/Brotli for API responses reduces transfer volume.
  • Regional architecture β€” Keep related services in the same region and AZ when possible.

9. Multi-Tenant Cost Considerations

Multi-tenant SaaS has unique cost optimization challenges. The architecture decisions you make early have long-term cost implications.

9.1 Tenant Isolation Models

Each isolation model has different cost characteristics:

  • Pool model (shared everything) β€” Lowest cost per tenant, but noisy neighbor risks
  • Silo model (dedicated resources) β€” Higher cost, but predictable and isolated
  • Bridge model (hybrid) β€” Shared compute, isolated data β€” often the sweet spot

Architecture Deep Dive

For enterprise customers requiring strict isolation, see Cellular Architecture for Multi-Tenant SaaS.

9.2 Cost Attribution by Tenant

Understanding cost-per-tenant is essential for pricing and profitability:

  • Tag everything β€” Use tenant ID tags on resources where possible
  • Application-level metering β€” Track API calls, storage, compute time per tenant
  • Allocate shared costs β€” Distribute infrastructure costs proportionally

9.3 Handling "Whale" Tenants

Large tenants can dominate your infrastructure costs. Strategies:

  • Usage-based pricing β€” Align revenue with costs
  • Dedicated resources β€” Move whales to isolated infrastructure
  • Rate limiting β€” Protect shared resources from abuse
  • Commitment pass-through β€” For very large tenants, pass through RI/SP savings

10. Cost Monitoring & Alerts

Continuous monitoring prevents cost surprises and catches issues early.

10.1 AWS Budgets

Set up budgets with alerts at 50%, 80%, and 100% thresholds:

  • Overall account budget
  • Per-service budgets for major cost centers (EC2, RDS, Lambda)
  • Per-environment budgets (production vs. development)

10.2 Cost Anomaly Detection

AWS Cost Anomaly Detection uses ML to identify unusual spending patterns. Enable it β€” it's free and catches issues that fixed budgets miss.

10.3 Weekly Cost Reviews

Build a habit of reviewing costs weekly:

  • Compare to previous week and same week last month
  • Identify top 5 cost increases
  • Check Savings Plans/RI utilization
  • Review Cost Explorer recommendations

11. Organizational Strategies

Cost optimization isn't just technical β€” it requires organizational alignment.

11.1 FinOps Culture

Building cost awareness into engineering culture:

  • Visibility β€” Share cost dashboards with engineering teams
  • Accountability β€” Assign cost ownership to teams/services
  • Incentives β€” Celebrate cost wins, include in performance reviews
  • Education β€” Train engineers on AWS pricing models

11.2 Multi-Account Strategy

Separate accounts provide cost isolation and governance:

  • Production, staging, development in separate accounts
  • Consolidated billing for volume discounts
  • SCPs to prevent expensive mistakes in non-production

Related Reading

See AWS Multi-Account Strategy for implementation details.

11.3 Development Environment Costs

Dev/test environments often cost more than they should:

  • Scheduled shutdown β€” Turn off dev resources nights/weekends (50%+ savings)
  • Smaller instances β€” Dev doesn't need production-sized resources
  • Spot instances β€” Perfect for ephemeral dev workloads
  • Shared environments β€” Not every developer needs their own stack

12. Cost Optimization Checklist

Use this checklist to systematically review your AWS costs:

Quick Wins (This Week)

  • ☐ Enable cost allocation tags
  • ☐ Delete unattached EBS volumes
  • ☐ Release unused Elastic IPs
  • ☐ Enable S3 Intelligent-Tiering
  • ☐ Set up AWS Budgets and alerts

This Month

  • ☐ Review Savings Plans recommendations
  • ☐ Right-size EC2 instances
  • ☐ Evaluate Graviton migration
  • ☐ Implement VPC endpoints for S3/DynamoDB
  • ☐ Review RDS Reserved Instance options

This Quarter

  • ☐ Implement cost attribution by tenant
  • ☐ Optimize Lambda memory settings
  • ☐ Review data transfer patterns
  • ☐ Implement dev environment scheduling
  • ☐ Establish weekly cost review process

Next Steps

AWS cost optimization is an ongoing process, not a one-time project. The strategies in this guide can reduce your AWS bill by 30-60%, but the specific opportunities depend on your architecture and usage patterns.

If you'd like expert help identifying your biggest savings opportunities, I offer a free 25-minute AWS cost assessment. We'll review your current architecture and identify 3-5 quick wins specific to your situation.

Ready to Reduce Your AWS Costs?

Get a free 25-minute assessment to identify your biggest savings opportunities.

Schedule Free Assessment
Dan Guisinger

Dan Guisinger

AWS-Certified Solutions Architect Professional, DevOps Engineer Professional, Security Specialty

20+ years building enterprise applications in healthcare and finance. I help SaaS companies optimize AWS costs while maintaining security and performance.