AWS vs Hetzner: Cost Analysis and Migration Strategy
Case study comparing AWS ($4,800/month) vs Hetzner ($268/month) showing 95% cost savings through bare metal servers and self-hosted infrastructure.
AWS vs Hetzner: How One Developer Cut Cloud Costs by 95%
Category: DevOps | Reading Time: 6 min
The $4,532 Wake-Up Call
When developer @dvassallo posted his cloud migration results, the numbers stopped a lot of people mid-scroll:
- AWS: $4,800/month
- Hetzner: $268/month
- Savings: 95%
That's not a rounding error. That's a different philosophy of infrastructure entirely.
If you're running a SaaS, an AI automation pipeline, or any kind of self-hosted tooling and you're still defaulting to AWS because "everyone uses AWS," this case study deserves your full attention. The difference between these two bills isn't just pricing — it's a fundamental difference in what you're actually buying.
Why AWS Bills Spiral Out of Control
AWS is an exceptional platform. It's also an exceptional billing engine.
The product is modular by design, which sounds like a feature until you realize that every module has its own price tag. Let's break down where a typical $4,800/month AWS bill actually comes from:
Compute (EC2) Even a modest production setup — two or three application servers — starts climbing fast once you factor in reserved instance pricing, on-demand fallback capacity, and multi-AZ redundancy.
Storage (EBS) EBS volumes are priced per GB per month, plus IOPS, plus throughput. A database server with 500GB of storage and decent I/O performance can easily run $150–$300/month in storage costs alone, before you've served a single request.
Data Transfer This is the one that surprises most developers. AWS charges for egress — data leaving AWS. If your application serves media, exports data, or communicates with external APIs at scale, you're paying per GB out. Inbound is free. Outbound is not.
Load Balancing An Application Load Balancer costs roughly $16–$20/month base, plus $0.008 per LCU-hour. At moderate traffic, this adds another $50–$150/month for what is, functionally, an nginx config.
Managed Services Tax RDS, ElastiCache, SQS, CloudWatch — each service adds a line item. AWS bundles convenience into cost. You're not just paying for compute; you're paying for someone else to manage it.
A realistic architecture for a mid-scale SaaS might look like this:
EC2 (3x t3.medium, multi-AZ): ~$180/month
EBS storage (500GB gp3): ~$200/month
RDS PostgreSQL (db.t3.medium): ~$130/month
Application Load Balancer: ~$80/month
Data transfer (5TB egress): ~$450/month
CloudWatch + misc services: ~$100/month
NAT Gateway: ~$90/month
--------------------------------------------------
Total: ~$1,230/month (conservative)
Scale that up with a real user base, add S3 for assets, throw in Lambda for background jobs, and $4,800/month becomes entirely plausible.
What Hetzner Actually Is (And Why It's Different)
Hetzner is a German hosting provider that rents you physical hardware — or fast virtual machines built on physical hardware — at European data center pricing with no egress fees.
That last part matters enormously. Hetzner does not charge for outbound bandwidth up to a generous included limit (typically 20TB/month on dedicated servers). For most applications, you will never hit that cap.
A comparable setup on Hetzner:
AX41-NVMe dedicated server (6-core, 64GB RAM, 2x512GB NVMe): $55/month
CX31 VPS (2 vCPU, 8GB RAM) x2 for app servers: $22/month
Managed PostgreSQL (or self-hosted on above): $0–$30/month
Load balancer (Hetzner LB11): $6/month
Object Storage (1TB): $5/month
Firewall, snapshots, monitoring: ~$10/month
--------------------------------------------------
Total: ~$98–$128/month
The $268/month figure from dvassallo's case likely reflects a more complex setup with multiple servers — still comfortably under $300.
The key difference: Hetzner sells you iron. AWS sells you services built on iron. You're paying for convenience, managed operations, and enterprise SLAs you may not need.
The Migration Strategy: What Self-Hosting Actually Looks Like
Moving off AWS isn't just swapping a provider — it's taking on operational responsibility. Here's what that looks like in practice.
Docker Compose as Your Infrastructure
Most applications that run on AWS managed services can run in Docker containers on a single well-specced Hetzner box. A typical docker-compose.yml for a SaaS stack:
services:
app:
image: your-app:latest
restart: always
ports:
- "3000:3000"
environment:
DATABASE_URL: postgres://user:pass@db:5432/myapp
db:
image: postgres:16
volumes:
- pgdata:/var/lib/postgresql/data
restart: always
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- certbot-certs:/etc/letsencrypt
restart: always
certbot:
image: certbot/certbot
volumes:
- certbot-certs:/etc/letsencrypt
volumes:
pgdata:
certbot-certs:
Backups and Reliability
This is the legitimate concern when leaving AWS. Managed RDS takes automated backups. You need to replicate that:
#!/bin/bash
# Daily PostgreSQL backup to Hetzner Object Storage
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
pg_dump $DATABASE_URL | gzip > /tmp/backup_$TIMESTAMP.sql.gz
s3cmd put /tmp/backup_$TIMESTAMP.sql.gz s3://your-bucket/backups/
rm /tmp/backup_$TIMESTAMP.sql.gz
Pair this with Hetzner's snapshot feature (automated server snapshots for $0.012/GB/month) and you have a reasonable disaster recovery posture.
Who Should NOT Migrate
To be direct: Hetzner is not right for every workload.
- Applications requiring global edge distribution (CloudFront, multi-region failover) still benefit from AWS
- Workloads with strict compliance requirements (HIPAA, FedRAMP) may require AWS GovCloud or specific certified infrastructure
- Teams with no DevOps capacity — if nobody on your team can manage a Linux server, AWS managed services are paying for real value
- Applications with highly variable, spiky traffic that genuinely need AWS's elastic scaling
The Honest Tradeoff
The 95% cost reduction is real, but it comes with a clear exchange:
| | AWS | Hetzner | |---|---|---| | Cost | High | Low | | Management overhead | Low | High | | Scalability | Elastic | Manual | | Reliability | Managed SLAs | Self-managed | | Egress fees | Significant | Minimal | | Compliance certifications | Extensive | Limited |
For solo developers, small SaaS products, AI automation pipelines, and teams with at least one infrastructure-comfortable engineer, Hetzner (or similar European providers like Contabo or OVHcloud) represents a compelling alternative that the AWS ecosystem rarely encourages you to consider.
Conclusion
dvassallo's migration from $4,800/month to $268/month is a concrete demonstration of a broader truth: cloud hyperscalers are priced for enterprises that need managed complexity. If you're an indie developer or a small team, you're often paying enterprise overhead for startup-scale workloads.
The path forward isn't necessarily abandoning AWS entirely. It's being deliberate about what you actually need versus what you're defaulting to. Run the numbers. Audit your AWS bill line by line. Then ask yourself honestly: which of these services am I paying for because they solve a real problem, and which am I paying for because I never questioned the default?
For many workloads, the answer leads to a $20 Hetzner VPS and a docker-compose up.
Source: @simmon_charlie on X | Original case by @dvassallo
Published on ClawList.io — Developer resources for AI automation and OpenClaw skills.
Tags
Related Articles
Vercel's React Best Practices as Reusable Skill
Vercel distilled 10 years of React expertise into a skill, demonstrating how organizations should package internal best practices as reusable AI agent skills.
AI-Powered Product Marketing with Video and Social Media
Guide on using AI to create product advertisement videos, user testimonials, and product images for social media marketing campaigns.
Engineering Better AI Agent Prompts with Software Design Principles
Author shares approach to writing clean, modular AI agent code by incorporating software engineering principles from classic literature into prompt engineering.