Lancecube Studio
Back to blog
Cloud

How We Cut AWS Costs by 42% Using Spot Instances and Terraform

February 26, 20266 min read

We run a mix of workloads on AWS: APIs, workers, and data pipelines. After a cost audit we found that a large share of spend was from on-demand EC2 and RDS. Here's the playbook we used to cut costs by 42% without sacrificing reliability — and how we keep it repeatable with Terraform.

Spot and savings plans

We moved stateless app and worker nodes to Spot instances with mixed instance types and fallback to on-demand in the same group. For baseline capacity we committed to Compute Savings Plans (1 year) which gave us a significant discount on EC2 and Fargate. We right-sized instances using CloudWatch and eliminated idle development and staging RDS outside business hours.

Terraform and tagging

All infra is in Terraform so we could introduce Spot groups, ASG mixed-instance policies, and RDS start/stop schedules in code. We enforced tagging (environment, team, cost-center) so Cost Explorer and budgets could track spend accurately. New stacks get the same patterns by default, so cost discipline is built in.

Outcome

We reduced our AWS bill by 42% in the first quarter and kept availability high. Spot interruptions are rare and we handle them with graceful shutdown and fast replacement. If you haven't looked at Spot and savings plans lately, it's worth another pass — and Terraform makes it repeatable across environments.