
Cost Optimization on AWS: A Real Case Study with Effective Saving Strategies
In the world of cloud computing, cost management is one of the most common challenges organizations face. AWS, with its flexible, scalable, and secure infrastructure, significantly supports businesses on their digital transformation journey. However, if resources are not configured properly, costs can quickly spiral.
In the world of cloud computing, cost management is one of the most common challenges organizations face. AWS, with its flexible, scalable, and secure infrastructure, significantly supports businesses on their digital transformation journey. However, if resources are not configured properly, costs can quickly spiral.
In this article, we transparently share a real-life cost optimization project we carried out with one of our clients. We explain how we achieved approximately $3,500 in monthly savings, step by step. Our goal is to show how you can make the most of AWS’s powerful tools — without wasting resources.
Existing Infrastructure: A Wide Range of AWS Services
Our client’s AWS architecture was broad and mature, actively leveraging the following services:
- Amazon Route 53
- AWS VPC
- AWS Certificate Manager
- Application Load Balancer (ALB)
- NAT Gateway
- Amazon EKS (Elastic Kubernetes Service)
- Amazon OpenSearch
- ElastiCache Redis
- Amazon RDS (Relational Database Service)
- AI & ML Services (SageMaker, etc.)
- Amazon QuickSight
The client was making strong use of AWS’s ecosystem, but over time, certain resources clearly needed optimization.
Step 1: Reducing NAT Gateway Costs
NAT Gateway can become a costly component, especially in high-traffic environments. In this case, the client had a NAT Gateway deployed per Availability Zone, along with significant outbound traffic.
What we did:
- We reviewed the architecture and refactored it to move services with outbound needs behind private subnets using NAT Instances instead of NAT Gateways.
- For services communicating with AWS-managed services, we introduced VPC Endpoints to keep traffic internal.
Result:
- This change alone reduced costs by approximately $2,000/month.
- It also helped reduce unnecessary traffic through the ALB, avoiding further load balancer cost increases.
Step 2: Embracing Graviton — Better Performance, Lower Costs
AWS Graviton processors, based on ARM architecture, provide impressive performance at a lower price point.
What we did:
- Migrated compute-heavy services such as OpenSearch and Redis to Graviton-compatible instance types.
- Switched EC2 instance types to Graviton-based models.
- Updated Amazon EKS node groups to use Graviton-powered nodes.
Extra Step:
- After these migrations, we committed to Savings Plans and Reserved Instances to lock in long-term cost reductions.
Result:
- These adjustments delivered 20–30% cost savings on compute resources alone.
In most use cases, Graviton outperformed comparable x86 instances.
Press enter or click to view image in full size
Step 3: Fine-Tuning Amazon RDS
Database services are often silent cost drivers. So we thoroughly audited the RDS usage as well.
What we did:
- Cleaned up old snapshots and unused historical data to reduce storage.
- Optimized IOPS configurations to match real usage.
- Migrated RDS instances to Graviton-supported instance types.
- Used Reserved Instances for long-term savings.
Result:
We maintained performance while significantly reducing storage and compute costs.
Press enter or click to view image in full size
Step 4: Kubernetes Resource Optimization on EKS — Only What You Need
Amazon EKS is one of the most advanced ways to run Kubernetes in the cloud. However, improper resource allocation in Kubernetes can silently drive up compute needs — and with it, your EC2 bill.
What we did:
- Audited requests and limits on each deployment to match actual usage.
- Identified overprovisioned pods and adjusted them accordingly.
- Collaborated with development teams to define accurate CPU/memory settings.
- Updated the manifests and rolled out the changes across the cluster.
- Reviewed and optimized HPA (Horizontal Pod Autoscaler) configurations.
- Set realistic target utilization thresholds.
- Tuned Cluster Auto Scaler to ensure nodes scale only when truly needed.
Result:
- We significantly reduced the number of nodes required.
- The system became more efficient with proper vertical and horizontal scaling.
- During peak traffic, it scales seamlessly, and during off-hours, it scales down — preventing unnecessary cost.
Reminder:
Misconfigured CPU/memory requests can cause the Kubernetes scheduler to overprovision pods, leading to excessive EC2 node usage and inflated cloud bills.
Misconfigured CPU/memory requests can cause the Kubernetes scheduler to overprovision pods, leading to excessive EC2 node usage and inflated cloud bills.
Press enter or click to view image in full size
How We Achieved These Savings
Here’s a breakdown of the essential steps for anyone looking to optimize AWS costs:
- Start with Metrics: Use AWS Cost Explorer, CloudWatch, and Trusted Advisor to visualize your spending patterns.
- Leverage AWS Cost Management Tools:
Tools like AWS Cost Explorer, Cost & Usage Reports, and AWS Budgets played a vital role in our process. They helped us:
- Understand granular spending patterns,
- Identify anomalies or sudden spikes,
- Track our optimization impact over time,
- Set up proactive budget alerts to stay on track.
Without these tools, it would have been nearly impossible to prioritize and validate the changes effectively.
- Identify Cost Drivers: Locate the top spenders — NAT Gateway, ALB, EC2, and RDS are usually among them.
- Explore Graviton and Savings Plans: These offer major savings without compromising performance.
- Understand Your Workloads: Know which components require outbound traffic, and which can stay private.
- Collaborate Across Teams: Cost optimization requires cooperation between DevOps, infrastructure, and development teams.
- Monitor and Test: After each change, validate performance through CloudWatch and application-level observability.
Press enter or click to view image in full size
References
- AWS Cost Explorer: https://aws.amazon.com/aws-cost-explorer/
- AWS Cost and Usage Reports: https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html
- AWS Budgets: https://aws.amazon.com/aws-cost-management/aws-budgets/
- AWS Compute Optimizer: https://aws.amazon.com/compute-optimizer/
- Amazon Graviton Using: https://aws.amazon.com/graviton/
- Amazon VPC Endpoints: https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints.html
- AWS Savings Plans: https://aws.amazon.com/savingsplans/
- AWS Reserved Instances: https://aws.amazon.com/ec2/pricing/reserved-instances/
- Amazon CloudWatch: https://aws.amazon.com/cloudwatch/
- Kubernetes YAML Reference: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/
- Horizontal Pod Autoscaler (HPA): https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
- Cluster Autoscaler on AWS: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/README.md
Final Thoughts: A More Powerful, Cost-Efficient AWS Architecture
AWS continues to be a leader in cloud infrastructure, offering best-in-class performance, flexibility, and innovation. However, its real power is unlocked when resources are architected and maintained with cost-efficiency in mind.
Our biggest takeaway from this project?
- “A well-architected AWS environment doesn’t just deliver performance — it delivers savings.”
If you’re looking to optimize your AWS spend, explore tools like AWS Trusted Advisor, Compute Optimizer, and Savings Plans, or consider partnering with a team that has hands-on experience in cloud cost management.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article