Skip to main content
• 10 min read

I Cut My Client's AWS Bill by 50% ($4K/Month) by Migrating to Bare Metal — Here's the Playbook

How I architected and executed an AWS-to-Hetzner bare-metal migration with zero downtime, saving $4K+/month. A practical guide to evaluating, planning, and executing cloud cost optimization for SaaS platforms.

Nahid Hossain

Engineering Reliability into AI Automation & Scalable Systems

Share:
I Cut My Client's AWS Bill by 50% ($4K/Month) by Migrating to Bare Metal — Here's the Playbook
A strategic playbook for migrating from expensive AWS infrastructure to cost-effective bare metal servers.

Let me tell you about the moment I realized we were lighting money on fire.

I was auditing the infrastructure at GrowSocial — a SaaS influencer marketing platform I'd spent years building. We were running on AWS. EC2 instances, RDS databases, ElastiCache, S3 buckets, CloudFront, the whole nine yards. The architecture was solid. The uptime was good.

The bill was $8,000+ a month.

For a platform that, while successful, didn't need half the managed services AWS was charging us for. We were paying premium prices for the convenience of clicking buttons in a dashboard — convenience that my team and I didn't actually need, because we knew how to manage infrastructure ourselves.

So I did something that goes against every "best practice" blog post on the internet: I migrated a production SaaS platform off AWS and onto bare-metal servers.

The result? A 50% reduction in infrastructure costs. Over $4,000 in monthly savings. Zero downtime during the migration. And honestly? The performance improved.

Here's exactly how I did it — and how to figure out if it makes sense for your business.

First: Cloud Isn't Always the Answer (And That's Okay)

I want to be clear about something upfront: I'm not anti-cloud. AWS, Azure, and GCP are incredible platforms. For many businesses — especially early-stage startups and companies with unpredictable scaling needs — managed cloud services are absolutely the right choice.

But somewhere around 2020, the tech industry developed this idea that using anything other than a major cloud provider was somehow irresponsible or backwards. I've heard CTOs literally say "we can't use bare metal, our investors will think we're not a real tech company."

That's not engineering. That's cargo cult thinking.

The real question isn't "cloud or bare metal?" It's: "What does my workload actually need, and what's the most cost-effective way to deliver it reliably?"

When Cloud Costs Stop Making Sense

Here are the signals that you might be overpaying for cloud:

1. Predictable, Steady Workloads

If your CPU utilization is consistently at 40-60% throughout the month, you're paying for burst capacity you never use. AWS charges you for potential scale whether you need it or not.

2. High Data Transfer Volumes

AWS egress charges are brutal. If you're moving large amounts of data — media files, API responses, backup syncs — the data transfer line item can quietly become your biggest cost.

3. Managed Services You Could Run Yourself

RDS for PostgreSQL is convenient. But if you have engineers who know how to manage PostgreSQL, you're paying a significant premium for Amazon to manage it for you. Same goes for ElastiCache (it's just Redis), managed Elasticsearch, and so on.

4. Your Team Has Infrastructure Competency

This is the most important factor. If your team can configure, deploy, monitor, and troubleshoot Linux servers — you don't need a managed cloud provider to do it for you at 3x the price.

The Migration Playbook

Here's the actual process I used at GrowSocial. I'm sharing this because I've seen too many "cloud migration" guides that are either too high-level to be useful or too vendor-specific to be practical.

Phase 1: Audit Everything

Before touching anything, I created a complete inventory:

  • Every service running on AWS — EC2 instances, databases, caching layers, queues, storage buckets, CDN configurations
  • Resource utilization data — CPU, memory, disk I/O, network for every component, averaged over 3 months
  • Dependencies and connections — Which services talk to which? What's the data flow?
  • Actual vs. provisioned capacity — How much of what we're paying for do we actually use?

This audit alone was eye-opening. We had EC2 instances running that nobody could identify the purpose of. We were paying for reserved capacity we'd long outgrown. Our RDS instance was provisioned for peak loads that happened maybe twice a year.

Phase 2: Choose Your Target Infrastructure

I evaluated several options:

Provider Pros Cons Monthly Cost (Similar Specs)
AWS (Current) Managed services, auto-scaling Expensive, egress charges $8,000+
Hetzner Dedicated Raw performance, fixed pricing Self-managed, EU-based ~$3,500
Hetzner Cloud Flexible, API-driven Less managed than AWS ~$4,000
OVH Dedicated Good price/performance Support quality varies ~$3,800

We went with Hetzner for a combination of reasons: excellent price-to-performance ratio, reliable hardware, great network connectivity, and a fixed monthly price that wouldn't surprise us.

Phase 3: Replicate the Architecture

This is where engineering experience is crucial. I needed to replicate everything AWS managed services were doing — but on bare metal.

Databases:

  • Migrated from RDS to self-managed PostgreSQL with streaming replication
  • Set up automated backups with point-in-time recovery
  • Configured monitoring with custom alerting thresholds

Caching:

  • Replaced ElastiCache with self-managed Redis
  • Implemented proper persistence and memory management
  • Set up Redis Sentinel for high availability

Application Servers:

  • Dockerized all applications (Symfony, Laravel, Python FastAPI)
  • Deployed with Docker Compose (we didn't need Kubernetes for our scale)
  • Set up automated CI/CD pipelines for consistent deployments

Storage:

  • Migrated S3 assets to local storage with CDN distribution
  • Implemented backup strategy with off-site replication

Mail Infrastructure:

  • Set up enterprise-grade mail delivery on dedicated hardware
  • Configured Mailcow with custom SPF, DKIM, and DMARC
  • Maximized inbox deliverability for high-volume outreach

Monitoring:

  • Deployed comprehensive monitoring stack
  • Custom alerting for business-critical metrics
  • Automated health checks with escalation paths

Phase 4: The Zero-Downtime Migration

This was the hardest part — and the part I'm most proud of. We couldn't afford downtime. The platform processed 2M+ social media records daily for enterprise clients across Europe. Every hour of downtime was directly measurable in lost business.

Here's the approach:

  1. Set up the new infrastructure in parallel. Everything running side-by-side with production.
  2. Sync databases with replication. Real-time data sync between AWS RDS and the new PostgreSQL servers.
  3. Test extensively on staging. Run the full application stack on the new infrastructure with production-mirrored data.
  4. DNS-based cutover. When everything was verified, I switched DNS records. TTL was pre-lowered to 300 seconds.
  5. Monitor aggressively. For the first 72 hours, I watched every metric like a hawk. Every anomaly was investigated immediately.

Zero downtime. Users didn't notice a thing.

Phase 5: Optimize and Iterate

After the migration, I spent another month optimizing:

  • Tuned PostgreSQL for our specific query patterns
  • Optimized Docker container resource allocation
  • Refined backup schedules and retention policies
  • Documented everything for the team

The Numbers: Before and After

Metric AWS (Before) Hetzner (After)
Monthly Cost $8,000+ ~$3,500
Savings $4,500+/month ($54K+/year)
API Response Times 120ms avg 85ms avg
Database Query Performance Good Better (dedicated hardware)
Uptime 99.95% 99.97%

The performance improvement wasn't expected, but it makes sense. On bare metal, you're not sharing resources with other tenants. Your CPU is your CPU. Your disk I/O is your disk I/O.

When You Should NOT Do This

Fairness demands I also tell you when this is a terrible idea:

  • You don't have infrastructure expertise on your team. Self-managed servers require someone who knows what they're doing. If your team is all application developers, stick with managed cloud.
  • Your workload is highly variable. If you need to scale from 2 servers to 20 for a week and then back down — that's exactly what cloud auto-scaling is for.
  • You're in a regulated industry that requires specific cloud compliance certifications (SOC 2, HIPAA, etc.) — though Hetzner is ISO 27001 certified.
  • Your business is too early to predict infrastructure needs. Use the cloud for the first year, then optimize.

What I'd Tell Every CTO

Stop treating your infrastructure decision as a religion. It's an engineering decision. Evaluate it like one.

Run the numbers. Audit your utilization. Be honest about what your team can manage. And if the math says you're overpaying for managed services you don't need — consider the alternatives.

The $54K+/year we saved at GrowSocial didn't just go into a bank account. It paid for an additional engineer. It funded product development. It made the business more competitive.

That's not "going backwards." That's engineering.


I'm Nahid Hossain — the engineer who architected this migration and lived to tell the tale. I help companies evaluate their cloud infrastructure, identify cost savings, and execute migrations without the drama. If your AWS bill is keeping you up at night, let's talk about your options.

→ Get a Free Infrastructure Assessment


Written by Nahid Hossain

Engineering Reliability into AI Automation & Scalable Systems