Skip to main content

AWS Cost Explorer, Savings Plans, and Cost Optimisation

Analyse and reduce AWS spend with Cost Explorer, Savings Plans, Reserved Instances, Cost Anomaly Detection, and smart networking cost decisions.

What you will learn

  • How AWS bills you and where most teams waste money without knowing it
  • Cost Explorer — how to drill into your bill and find what is costing most
  • The difference between Savings Plans and Reserved Instances
  • Compute Savings Plans vs EC2 Instance Savings Plans — which is more flexible
  • Cost Anomaly Detection — ML that spots unexpected spending automatically
  • AWS Budgets — set limits and get alerted before bills surprise you
  • Networking costs — the rules that catch every team eventually
  • Instance Scheduler — turning off non-production resources overnight
  • Trusted Advisor — the free account health scanner

Why this matters

A Razorpay engineering team doubled their EC2 fleet during a load test and forgot to scale back down. Three weeks later their AWS bill was double the usual amount and nobody noticed until the invoice arrived. At a Mumbai startup, NAT Gateway charges were higher than the EC2 bill because all S3 traffic was routing through NAT instead of a free VPC Endpoint. At Zerodha, switching idle development instances from On-Demand to Savings Plans cut their compute bill by 40% overnight. AWS costs are invisible until you look. And by the time you look, you have often been overpaying for weeks.

How AWS Bills You

AWS billing has four components:

TEXT
Compute: EC2 hours, Lambda invocations, ECS task seconds
Storage: S3 GB-months, EBS GB-months, Snapshot GB-months
Data transfer: Outbound to internet, cross-AZ, cross-region
Requests: API calls, S3 GET/PUT requests, KMS operations

The costs that surprise teams most are not compute — they are data transfer. Traffic leaving AWS to the internet, traffic crossing Availability Zones, and NAT Gateway processing fees accumulate silently.

Free data transfer (zero cost):

◈ DIAGRAM
Traffic coming INTO AWS from internet → always free
Traffic between services in the SAME AZ → free (use private IPs)
Traffic to S3 or DynamoDB via VPC Gateway Endpoint → free

Charged data transfer:

◈ DIAGRAM
Traffic leaving AWS to the internet → $0.085-0.09 per GB
Traffic crossing Availability Zones → $0.01 per GB each direction
NAT Gateway processing → $0.045 per GB
Cross-region traffic → $0.02 per GB
Remember

Traffic between services in the same AZ using private IPs is free. The same traffic using public IPs costs money — even within the same region. Always use private IPs for internal communication.

AWS Cost Explorer

Cost Explorer is the primary tool for understanding your AWS bill. It gives you charts, filters, and forecasts across any time range.

What you can do:

◈ DIAGRAM
View costs by:
Service → EC2 is costing X, RDS is costing Y, NAT Gateway is Z
Region → ap-south-1 vs us-east-1 breakdown
Account → per account in your Organisation
Tag → per team, per project, per environment
Instance type → which EC2 types are most expensive
Filter to:
Last 3 months of EC2 costs in ap-south-1 only
This month's costs for resources tagged Environment=prod
RDS costs across all regions
Forecast:
Based on current usage, predict next 12 months of spend
Identify trend before it becomes a surprise

Resource-level granularity:

Cost Explorer can show costs per individual EC2 instance — not just per service. Identify the single most expensive instance in your account. Identify instances running 24/7 that are only used during business hours.

Rightsizing recommendations:

Cost Explorer analyses your EC2 usage and recommends cheaper instance types that can handle your actual workload. If your m5.xlarge is consistently at 8% CPU, Cost Explorer suggests t3.large which costs 60% less.

AWS Budgets — Know Before You Are Surprised

Budgets send alerts when costs exceed a threshold you define.

TEXT
Budget: monthly EC2 spend > $500
Alert at 80%: "you have spent $400 this month on EC2"
Alert at 100%: "you have spent $500 — budget reached"
Alert at 110%: "you have exceeded budget — spending $550"

Budget types:

Type What it tracks
Cost budget Total spend in dollars
Usage budget Amount of a specific service used (EC2 hours, S3 GB)
Savings Plans budget Coverage or utilisation percentage
Reservation budget RI coverage or utilisation

Best practice: set one account-level monthly budget and one per-service budget for your top 3 most expensive services. Alert at 80% and 100%.

Savings Plans — Commit to Save

On-Demand EC2 is the most expensive pricing option. You pay full price for every hour. Savings Plans offer up to 72% discount in exchange for committing to a minimum spend for 1 or 3 years.

How it works:

◈ DIAGRAM
You commit: "I will spend at least $10/hour on AWS compute for 3 years"
AWS gives you: up to 72% discount on that compute
Usage above $10/hour → charged at On-Demand rates

Two types of Savings Plans:

Compute Savings Plans — maximum flexibility:

◈ DIAGRAM
Applies to: EC2 (any instance family, any region, any OS), Lambda, Fargate
Change instance family: t3 → m5 → c6i → discount still applies
Change region: ap-south-1 → us-east-1 → discount still applies
Discount: up to 66%

EC2 Instance Savings Plans — deeper discount, less flexibility:

TEXT
Applies to: one specific instance family in one specific region
Example: commit to m5 in ap-south-1 only
Cannot switch family or region — discount lost
Discount: up to 72%

Savings Plans vs Reserved Instances:

Savings Plans Reserved Instances
Commitment Dollar amount per hour Specific instance type
Flexibility High (Compute SP) or medium (EC2 SP) Low — locked to type
Management Automatic — applies to matching usage Manual — must assign
Best for Most teams — simpler to manage Predictable, unchanging workloads
Tip

Start with Compute Savings Plans. They are more flexible — if you change instance types or regions, the discount moves with you. EC2 Instance Savings Plans give a slightly higher discount but lock you to a specific family and region. For most teams the flexibility of Compute Savings Plans is worth the small discount difference.

Cost Anomaly Detection

Cost Anomaly Detection uses machine learning to learn your normal spending patterns and alert you when something unusual happens — before you see it on your monthly invoice.

◈ DIAGRAM
AWS learns your normal baseline:
EC2 usually costs $200-220/day
RDS usually costs $80-90/day
Thursday: EC2 costs $800
→ Anomaly detected
→ Alert sent immediately: "EC2 spend 4x higher than expected in ap-south-1"
You investigate: a developer left a p3.8xlarge (GPU instance) running overnight

Without anomaly detection: you discover this at month-end when the invoice arrives. With anomaly detection: you get alerted within hours and shut it down.

Setting up:

◈ DIAGRAM
Cost Management → Cost Anomaly Detection → Create monitor
Monitor type: AWS services (monitors each service individually)
Alert threshold: $20 anomaly (alert only if unexpected spend exceeds $20)
Notification: SNS → your email or Slack

Networking Cost — The Hidden Bill

Networking charges are the most commonly overlooked AWS cost. They accumulate silently and are hard to trace back to the cause.

The most expensive networking mistake:

◈ DIAGRAM
Private EC2 → NAT Gateway → S3 (paid NAT processing per GB)
Fix: Create a free S3 VPC Gateway Endpoint
Private EC2 → VPC Endpoint → S3 (free)
For a team storing and reading 10 TB/month in S3:
Without endpoint: 10 TB × $0.045 = $450/month in NAT Gateway fees
With endpoint: $0/month

Cross-AZ data transfer:

◈ DIAGRAM
EC2 in ap-south-1a → EC2 in ap-south-1b → $0.01/GB each way
EC2 in ap-south-1a → EC2 in ap-south-1a → free
For a high-traffic microservice making 100 GB/day of cross-AZ calls:
$0.01 × 100 GB × 2 directions × 30 days = $60/month
Fix: deploy interdependent services in the same AZ

Outbound to internet:

◈ DIAGRAM
EC2 serving 1 TB/month to internet users → ~$85/month in data transfer
With CloudFront in front: CloudFront to internet is cheaper + most served from cache
Cache hit rate of 80% → only 200 GB to origin → significant savings

Instance Scheduler — Turn Off What You Do Not Need

Most development, staging, and test environments only need to run during business hours. Leaving them running 24/7 wastes 65% of their cost.

AWS Instance Scheduler is a CloudFormation solution that automatically starts and stops EC2 and RDS instances on a schedule.

◈ DIAGRAM
Dev EC2 instances:
Start: Monday-Friday 8 AM IST
Stop: Monday-Friday 10 PM IST
Weekend: off entirely
Result: instead of 720 hours/month → 280 hours/month
Cost reduction: 61%

Deploy it: AWS Solutions Library → "Instance Scheduler on AWS" → Launch CloudFormation stack Set schedule tags on your instances → scheduler handles the rest

Hands-on Lab — Cost Explorer, Budget, and Anomaly Detection

Step 1 — Explore your current costs

◈ DIAGRAM
AWS Console → Cost Management → Cost Explorer → Launch Cost Explorer
View: Monthly costs by service (last 3 months)
Which service costs most? Note the amounts.
Filter: Service = EC2 Time = last 30 days
Group by: Instance type
Which instance types are you spending most on?
Filter: Service = Data Transfer
This shows all data transfer charges — often a surprise.

Step 2 — Find rightsizing opportunities

◈ DIAGRAM
Cost Explorer → Rightsizing recommendations
Review instances flagged as over-provisioned
Check: what is the recommended instance type and projected savings?

Step 3 — Create a monthly budget

◈ DIAGRAM
Cost Management → Budgets → Create budget
Budget type: Cost budget
Period: Monthly
Budget amount: $100 (adjust to your actual spend)
Alerts:
Add alert → threshold 80% → email notification
Add alert → threshold 100% → email notification
Create budget
Now you will get an email if spending approaches or exceeds $100/month.

Step 4 — Enable Cost Anomaly Detection

◈ DIAGRAM
Cost Management → Cost Anomaly Detection → Create monitor
Monitor name: all-services-monitor
Monitor type: AWS services
Create monitor
Create alert subscription:
Alert name: daily-anomaly-alert
Threshold: individual alert → $10 impact (alert on any anomaly above $10)
Notification: email → your email
Create subscription

Step 5 — Check Savings Plans recommendations

◈ DIAGRAM
Cost Management → Savings Plans → Recommendations
Term: 1 year Payment: No upfront
See recommended commitment amount and projected savings
If you have stable compute usage, this shows how much you could save.
For a lab account this may show $0 — that is normal with low usage.

Step 6 — Verify you have S3 VPC Endpoint (free cost saving)

◈ DIAGRAM
VPC → Endpoints → filter by Service Name containing s3
If no S3 Gateway Endpoint exists → create one (it is free)
All S3 traffic from private subnets now bypasses NAT Gateway

Common Mistakes to Avoid

Common Mistake

Routing S3 traffic through NAT Gateway. NAT Gateway charges $0.045 per GB processed. S3 VPC Gateway Endpoints are completely free. For any team storing or reading meaningful amounts of data from S3, creating the Gateway Endpoint takes 2 minutes and can save hundreds of dollars per month.

Common Mistake

Leaving development and staging EC2 instances running 24/7. These environments are typically only used during business hours. Deploy Instance Scheduler and recover 60%+ of their cost immediately. It takes one CloudFormation stack and a few tags.

Common Mistake

Not setting AWS Budgets until after the first surprise invoice. Budgets are free to create. Set them on day one. An 80% alert gives you time to investigate before reaching your limit. A 100% alert means you are already over — but at least you know immediately instead of at month end.

Tip

Tag everything from day one — every EC2, RDS, S3 bucket, NAT Gateway. Use consistent tags: Environment (dev/staging/prod), Team (backend/frontend/data), Project. Without tags, Cost Explorer shows you what you are spending but cannot tell you why or who owns it. With tags you can give each team their exact AWS bill.

Resources

AWS Direct Connect vs Site-to-Site VPN Failover

AWS Direct Connect vs Site-to-Site VPN Failover

Direct Connect vs VPN isn't really either/or for production — it's a primary-plus-failover pattern. Here's how to design it, and when either/or is right.

5 min read•Aug 2026
Lambda vs Fargate vs EC2 Spot: The Cost Crossover

Lambda vs Fargate vs EC2 Spot: The Cost Crossover

Lambda vs Fargate vs EC2 Spot, at the crossover where Lambda stops being cheaper — 2026 pricing, invocation thresholds, and interruption math.

5 min read•Aug 2026
Secrets Manager vs Parameter Store vs Vault

Secrets Manager vs Parameter Store vs Vault

AWS Secrets Manager, Parameter Store, and HashiCorp Vault compared for 2026 - cost math, rotation, multi-cloud fit, and the Vault-to-OpenBao fork.

5 min read•Aug 2026
AWS VPC Security: Hardening Every Layer

AWS VPC Security: Hardening Every Layer

Most cloud security incidents start with a misconfigured VPC. Here's how to harden every layer — subnets, Security Groups, NACLs, and IAM — for production.

5 min read•Jul 2026
Event-Driven Architecture on AWS Explained

Event-Driven Architecture on AWS Explained

Event-driven architecture on AWS decouples services and absorbs traffic spikes using SQS, SNS, EventBridge, and Lambda — workflows that scale themselves.

5 min read•Jul 2026
S3 vs RDS vs DynamoDB: Choosing AWS Storage

S3 vs RDS vs DynamoDB: Choosing AWS Storage

Choosing S3, RDS, or DynamoDB wrong costs you in performance, cost, and scalability. Here is a practical decision guide based on your actual access patterns.

5 min read•Jul 2026
AWS Cost Optimisation: Cut Cloud Bills 40-60%

AWS Cost Optimisation: Cut Cloud Bills 40-60%

AWS bills surprise teams every month. Here are the 8 concrete actions that cut cloud spend by 40-60% without touching your application architecture.

5 min read•Jul 2026
EC2 vs Lambda vs Fargate: Choosing AWS Compute

EC2 vs Lambda vs Fargate: Choosing AWS Compute

EC2, Lambda, or Fargate — choosing the wrong AWS compute option costs you money and performance. Here is exactly when to use each one in production.

5 min read•Jul 2026

Explore More in AWS DevOps, Cost, and Machine Learning

All 6 Topics

Frequently Asked Questions

Is AWS Cost Explorer, Savings Plans, and Cost Optimisation free to learn on DevOps Network?

Yes - this topic, like everything on DevOps Network, is 100% free with no paywall or sign-up gate.

What does the AWS Cost Explorer, Savings Plans, and Cost Optimisation topic cover?

Analyse and reduce AWS spend with Cost Explorer, Savings Plans, Reserved Instances, Cost Anomaly Detection, and smart networking cost decisions.