Skip to main content
Dulan Wirajith Lokunarangodage - Engineering articles author/ blog
HomeArticlesSeriesTopicsTipsAbout
Read latest
HomeArticlesSeriesTopicsTipsAbout
Read latest articles →
Dulan Wirajith Lokunarangodage - Engineering articles author/ blog
ArticlesSeriesTopicsRSS GitHub LinkedIn
© 2026 Dulan Wirajith Lokunarangodage. All rights reserved.
www.dulanwirajith.com
Home/Articles/AWS/Reducing AWS Costs by 40% Through System Optimization
Series reading path
You’re reading this as part of the AWS Architecture Patterns series.
View full series
Cloud

Reducing AWS Costs by 40% Through System Optimization

Real-world cloud cost optimization strategies applied to a production AWS environment-without sacrificing performance or reliability.

May 6, 2026·3 min read·
☁️

Problem

Cloud infrastructure costs were growing faster than revenue. A mid-sized SaaS platform was spending $45K/month on AWS with no clear ceiling. Costs had doubled over 12 months without a corresponding increase in traffic.

Goal: Reduce monthly AWS spend by 30–40% without degrading system performance or reliability.


System Constraints

  • Production system: 99.9% uptime requirement
  • No full re-architecture-incremental changes only
  • Team size: 4 engineers, 2-week optimization sprints
  • Existing stack: ECS Fargate, RDS PostgreSQL, S3, CloudFront, SQS, Lambda

Root Cause Analysis

Before cutting costs, we measured. AWS Cost Explorer + CloudWatch revealed:

Rendering…
Service% of BillWaste Category
RDS (Multi-AZ)38%Over-provisioned instance class
ECS Fargate29%Always-on dev/staging environments
Data Transfer14%Cross-AZ traffic not colocated
EC2 (legacy)11%Zombie instances from old deployments
Everything else8%-

Optimizations Applied

1. RDS Right-Sizing

💡Before you right-size

Always measure for at least 2 weeks before downsizing RDS. CPU spikes are easy to miss on a daily average — check P95/P99 CloudWatch metrics, not just the mean.

The RDS instance was a db.r5.2xlarge running at 12% average CPU with 30% memory utilization. Downsizing to db.r5.large and enabling RDS Proxy for connection pooling:

  • Saved $1,800/month
  • No latency impact (monitored via CloudWatch RDS metrics for 2 weeks post-change)

2. ECS Fargate Scheduling for Non-Production

Dev and staging environments ran 24/7. A Lambda function triggered by EventBridge now scales them to zero outside business hours (Mon–Fri, 7am–7pm AEST):

  • Saved $3,200/month
  • Zero developer workflow disruption

3. S3 Intelligent-Tiering

Large buckets containing infrequently accessed assets (logs, backups, old uploads) were moved to S3 Intelligent-Tiering:

  • Saved $900/month
  • No application code changes required

4. Reserved Instances for Production Workloads

⚠️Warning

Reserved Instances are a 1-year (or 3-year) financial commitment. Only commit capacity you are confident will stay constant. Convertible RIs offer more flexibility at a slightly lower discount.

Converted production ECS and RDS resources from on-demand to 1-year Reserved Instances:

  • Saved $4,100/month (34% discount on committed capacity)

5. Colocation of Services

Cross-AZ data transfer was generating unexpected costs. Services in the same logical cluster were migrated into the same AZ where possible:

  • Saved $800/month

6. Terminate Zombie EC2 Instances

11 EC2 instances from a previous deployment architecture were still running and had no active traffic. Terminated after confirming no dependencies:

  • Saved $1,400/month

Results

Rendering…
MetricBeforeAfter
Monthly AWS spend$45,200$27,100
Cost reduction-40% ($18,100/month)
System uptime99.91%99.94%
P99 API latency185ms178ms

Annual savings: ~$217,000


Trade-offs

📝Note

Every optimization here was done incrementally across 3 two-week sprints. Attempting all changes at once in a production system would have made it nearly impossible to attribute any regressions to a specific change.

  • Reserved Instances reduce flexibility (1-year commitment)
  • Dev environment scheduling adds 1–2 minute startup latency for engineers
  • RDS right-sizing requires careful monitoring for 2–4 weeks post-change

→ Related: Scaling Backend Systems for High Concurrency → Related: System Design Trade-offs Every Engineer Should Understand

awscloudcost-optimization
Series
AWS Architecture Patterns
Real-world AWS architecture, cost control, and production optimization patterns.
Part 1 of 2
← PreviousView seriesNext →
Comments
On This Page
No headings found in article
Related Articles
💰
AWS Cost Optimization in Australia: How AU Companies Save 40%+ in 2026
Related Topics
•
Backend
2 articles
•
Modernization
5 articles
•
System Design
2 articles