AWS Cost Optimization Drift Detection
You know what really gets me fired up? Waste. Pure, unnecessary waste. And that's exactly what I found when I started looking into our AWS spending patterns. Developers were spinning up resources for quick tests, proof of concepts, debugging sessions - and then just walking away...
The Invisible Money Leak
You know what really gets me fired up? Waste. Pure, unnecessary waste. And that's exactly what I found when I started looking into our AWS spending patterns. Developers were spinning up resources for quick tests, proof of concepts, debugging sessions - and then just walking away. These resources kept running 24/7, silently racking up costs like a taxi meter that never stops.
The worst part? Nobody even knew it was happening. These orphaned resources were scattered across four different environments, invisible to everyone. The monthly AWS bills kept climbing, but when management asked "what's driving these costs?" nobody had answers. It was like having a water leak somewhere in your house - you know you're losing money, but you can't find where.
I decided to fix this once and for all. Not with policies or training or stern emails about "remembering to clean up your resources." No, I wanted to make the invisible visible and then automatically deal with it.
.webp&w=3840&q=75)
.webp&w=3840&q=75)
The Tool That Changed Everything
I found this tool called driftctl from Snyk. The concept was beautiful in its simplicity - it compares what should exist (according to your Terraform) against what actually exists (in your AWS account). The difference? That's your drift. That's your waste. That's your money burning in the cloud.
My approach was systematic. First, I needed to establish what "should" exist. This meant importing all our legitimate AWS resources into Terraform - users, production instances, databases, load balancers, everything. This became our source of truth, our baseline for what belonged in our infrastructure.
The import process alone was eye-opening. I'm running these Terraform imports, and I keep finding resources where everyone's like "what's that?" Nobody knew what they were for, who created them, or whether they were still needed. We had phantom infrastructure running for months, maybe years.
Making It Social with Slack
Here's where I got creative. Most drift detection tools generate reports that nobody reads. PDFs attached to emails that go straight to archive. I wanted something different. I wanted to make resource waste a social problem with a social solution.
I built a Slack integration that changed the game. Every morning, teams would get a friendly message: "Hey, these resources were created yesterday. If you want to keep them, just react with a ✅. Otherwise, they're gone in 24 hours." Simple. Social. Effective.
The beauty was in the psychology. When your resource usage is visible to your whole team, you think twice about leaving things running. When cleanup is as easy as not clicking an emoji, the friction disappears. And when everyone can see who's leaving resources running, peer pressure does what policies never could.
.webp&w=3840&q=75)
.webp&w=3840&q=75)
The CTO Who Made It Stick
What really transformed this from a nice tool to an organizational change was executive buy-in. Our CTO started using the drift reports for strategic insights. He wasn't micromanaging - he was pattern matching.
Every weekend, I'd get lists from him: "Import these resources, they're from the new project. Delete those, they're from the canceled initiative. Why do we have 50 unused Elastic IPs?" This executive attention changed everything. When developers know the CTO is looking at resource waste, they start being proactive about cleanup.
The weekend reviews became strategic planning sessions. We'd identify patterns - which teams consistently cleaned up after themselves, which types of resources were most often abandoned, where our Terraform coverage was lacking. This wasn't just cost optimization anymore - it was organizational intelligence.
The Numbers That Made Everyone Believers
Within the first month, we identified and eliminated over 50% of untracked resources. I'm not talking about tiny instances - we found forgotten RDS databases running 24/7, Elastic Load Balancers serving nothing, NAT Gateways in unused VPCs (those are expensive!), hundreds of unused Elastic IPs, and EC2 instances that hadn't been accessed in months.
The cost savings were immediate and significant. We're talking thousands of dollars per month back in the budget. But the real value was in what we learned about our organization's habits and patterns.


The Cultural Transformation
The most interesting part wasn't the technical implementation - it was watching how behavior changed. The daily Slack notifications became part of the rhythm of work. Teams started competing to have the cleanest resource usage. "Zero drift" became a badge of honor.
Developers began thinking about resource lifecycle from creation. They'd tag resources properly, set up auto-termination for temporary resources, and actually clean up after experiments. The visibility created accountability without being punitive.
We also saw unexpected benefits. The drift detection caught security issues - forgotten resources with outdated security groups, test databases with production data, IAM roles with excessive permissions. Fixing drift wasn't just about cost - it was about security and compliance too.
Why This Matters
In the end, this project proved that some of the highest-impact work happens in the unglamorous spaces. Nobody gets excited about resource cleanup. There's no cutting-edge technology here. But the business impact was immediate and substantial.
It also showed that the best solutions often combine technical automation with human psychology. The drift detection was the technical foundation, but the Slack integration and executive engagement were what made it actually work.
You know what's satisfying? Logging into AWS console now and seeing a clean resource list. No mysteries, no "what's that?" moments, no forgotten experiments burning money. Just the resources we need, tracked and managed properly.
That's the mark of good infrastructure work - when waste becomes visible, it becomes manageable. And when it becomes manageable, it usually disappears. We proved that with the right tools and approach, you can transform infrastructure chaos into infrastructure discipline. One Slack message at a time.
Questions People Actually Ask
You know, after sharing this project, I keep getting the same questions. So here are the real answers to the things people actually want to know.