Stop Guessing, Start Cutting: Cloud Costs You Can Ship This Week
I was staring at a $50,000 AWS bill for a client's barely-used staging environment. Not a typo. Fifty. Grand. For a place where a handful of developers pushed code maybe twice a week. That’s when I stopped writing fancy cost-saving proposals and started making things actually cheaper, right now.
Why this matters in 2026
Cloud costs aren't a "nice to have" optimization anymore. They're a direct hit to your runway. With tighter budgets and more scrutiny, proving you can manage infrastructure spend effectively isn't just good engineering, it's survival. Companies that treat cloud spend as an afterthought are the ones I see struggling to raise their next round or, worse, shutting down.
Three things I learned shipping this
1. The Tyranny of the "Always On" Staging Environment
We had a client, a SaaS company building an HR platform (similar to EngageHRIS, but their version), who was bleeding money. Their staging environment, a complete replica of production, was running 24/7. Why? "Just in case." "Someone might need it." "We don't want to wait for it to spin up." This was costing them nearly $15,000 a month.
The fix was embarrassingly simple: scheduled shutdowns. We implemented a cron job on AWS Lambda that would shut down all non-production EC2 instances (staging, dev, QA) every Friday at 6 PM and bring them back online Monday at 8 AM. We also did this for their RDS instances. We added a Slack integration so developers could manually spin them up if needed for an urgent weekend test, but the default was OFF.
The result? Their monthly bill for those environments dropped by over 80%. That's $12,000 saved every month. The "just in case" fear was replaced by a little bit of planning and a lot of saved cash. The only real pushback was from one developer who liked to tinker on Saturdays, but we convinced him his personal project could run on his laptop.
Here's a simplified Lambda function in Python that does the job:
import boto3
import osregion = os.environ['AWS_REGION']
instance_ids = ['i-0abcdef1234567890', 'i-0fedcba987654321'] # Replace with your actual IDs
db_instance_id = 'my-staging-db' # Replace with your actual DB ID
def stop_instances():
ec2 = boto3.client('ec2', region_name=region)
ec2.stop_instances(InstanceIds=instance_ids)
print(f"Stopped instances: {instance_ids}")
rds = boto3.client('rds', region_name=region)
rds.stop_db_instance(DBInstanceIdentifier=db_instance_id)
print(f"Stopped DB instance: {db_instance_id}")
def start_instances():
ec2 = boto3.client('ec2', region_name=region)
ec2.start_instances(InstanceIds=instance_ids)
print(f"Started instances: {instance_ids}")
rds = boto3.client('rds', region_name=region)
rds.start_db_instance(DBInstanceIdentifier=db_instance_id)
print(f"Started DB instance: {db_instance_id}")
This would be triggered by CloudWatch Events/EventBridge
Example: stop_instances() on Friday evening, start_instances() on Monday morning
This isn't rocket science. It's basic scheduling and discipline. If your non-production environments aren't essential on weekends or overnight, turn them off. Period.
2. Unused EBS Volumes: The Silent Bill Collectors
I worked with a startup building a niche e-commerce platform (think LaundryIT meets Raketlance). They had been through several engineering teams before me, and somewhere along the line, a lot of EBS volumes were created, attached to instances, then those instances were terminated. But the volumes themselves? They were left orphaned.
These weren't tiny volumes. We found dozens of 1TB and 2TB EBS volumes, each costing around $0.08 per GB per month. For a 2TB volume, that's $16.38 a month. Multiply that by 30 orphaned volumes, and you're looking at nearly $500 a month for data that wasn't even being used. Over a year, that's $6,000 down the drain, for nothing.
The solution was a combination of AWS Config and a simple script. AWS Config can track resource changes, but for finding orphaned resources, a dedicated script run periodically against your AWS account is more effective. We wrote a Python script using boto3 that iterated through all EBS volumes, checked if they were attached to any running EC2 instance, and flagged any that weren't. We then manually reviewed the flagged volumes for a week to ensure we weren't about to delete something critical that was supposed to be unattached for a specific reason (like a backup snapshot).
import boto3ec2 = boto3.client('ec2')
rds = boto3.client('rds')
def find_unattached_ebs_volumes():
unattached_volumes = []
response = ec2.describe_volumes(Filters=[{'Name': 'status', 'Values': ['available']}])
for volume in response['Volumes']:
unattached_volumes.append({
'VolumeId': volume['VolumeId'],
'Size': volume['Size'],
'CreateTime': volume['CreateTime']
})
return unattached_volumes
Run this script, review the output, and then delete the identified volumes if confirmed unused.
Be cautious: always double-check before deleting!
The cost savings weren't astronomical in this case, maybe $6,000 a year. But it was pure profit. Zero effort for the engineering team, just sitting there, costing money. It taught me that infrastructure isn't just what's running; it's also what's left behind. Regularly auditing for orphaned resources is a must.
3. Over-Provisioned RDS Instances: The Expensive Hobby
On the V2 rebuild of Tokkatok, we inherited an RDS instance that was frankly overkill. It was a db.r5.xlarge running MySQL for a platform that, at the time, had maybe 10,000 active users. The previous team had likely sized it for massive growth that never materialized, or they just picked a big number to be safe. This single RDS instance was costing us around $500 a month.
We monitored the actual CPU utilization, memory usage, and IOPS for a couple of weeks. The peak CPU was rarely above 20%, memory was consistently under 50%, and IOPS were negligible. We decided to downscale it to a db.t3.medium, which is a much more cost-effective "burstable" instance type. The immediate cost reduction was significant. The new instance cost us around $100 a month. That’s a $400 monthly saving, or $4,800 a year, for a system that performed identically.
The key here is monitoring. Don't just guess. Use your cloud provider's monitoring tools (CloudWatch for AWS, Azure Monitor for Azure, Google Cloud Monitoring for GCP) to understand your actual resource usage. Then, match your instance types to that usage. If your database is rarely hitting high load, a burstable instance is often perfectly adequate.
-- Example of checking current MySQL instance metrics in CloudWatch (not runnable code, conceptual)
-- You'd look at metrics like:
-- CPUUtilization: Average, Maximum
-- FreeableMemory: Average
-- ReadIOPS, WriteIOPS: Average, Maximum
The fear is always that downsizing will cause performance issues. But if your monitoring data supports it, the risk is manageable. We did this during a low-traffic period and had a rollback plan, but it was a non-event. The system ran just as well, and we saved a substantial chunk of our cloud bill.
What I would skip if I started today
I'd skip the fancy, enterprise-grade cost management platforms. Not at first, anyway. Tools like CloudHealth or Apptio are powerful, but they come with hefty price tags and often require dedicated personnel to manage. For most early-stage to mid-sized companies, the biggest wins are found in the low-hanging fruit: turning off unused resources, right-sizing instances, and eliminating orphaned storage. You can get 80% of the benefit with basic cloud provider tools and some discipline. Focus on the tactical wins first. Once you’ve wrung those dry, then consider the more sophisticated tools.
What this looks like for your team
- Schedule your non-production environments: Identify all your dev, staging, and QA environments. Implement a clear shutdown schedule. Start with overnight and weekends. If someone really needs it, they can hit a button to spin it up for an hour. This is often a 50-80% reduction in cost for those environments.
- Run an orphaned resource audit: Schedule a quarterly script (like the EBS one I showed) to find unattached storage, unassigned Elastic IPs, and other resources that aren't tied to anything active. Manually review and delete. This is pure savings for zero ongoing cost.
- Right-size one critical service: Pick one service that you suspect might be over-provisioned, like your primary database or a key application server. Monitor its resource utilization (CPU, memory, IOPS) for two weeks. If it's consistently under 50% utilization, plan a controlled downscale.
John from California
just requested a quote
2 minutes ago