The Background
A small dev team was facing a growing AWS bill they did not fully understand. But cost was only part of the problem. They had limited visibility into how their infrastructure actually worked, and relying entirely on a US-based cloud provider raised questions around data sovereignty. I helped out informally: looking over the full stack, spotting waste, and mapping out realistic alternatives that would give them more control over their setup.
"This wasn't just about cutting costs. It was about understanding the infrastructure, owning the decisions, and knowing where the data actually lives, not just trusting a US provider to handle it."
The Approach
The work was informal and hands-on, spread across a few sessions:
Phase 1: Cost Analysis & Inventory
Built an automated AWS inventory script to pull every running service, instance size, and configuration. Mapped the full cost breakdown: RDS (35%), ECS (16%), ElastiCache (10%), CloudFront (7%), and identified that NAT Gateway costs alone were a known waste area.
Phase 2: Infrastructure Mapping
Created a structured checklist to verify compute resources, database sizing, Redis usage patterns, storage categories, and networking requirements. This produced a standardized inventory suitable for getting quotes from alternative providers.
Phase 3: Strategic Recommendations
Evaluated three paths: optimize on AWS (20 to 30% savings), migrate to a Swedish managed provider (40 to 50% savings), or full self-hosting at a Swedish datacenter (60 to 70% savings). Each option came with honest trade-offs around risk, team skill requirements, and operational burden.
Phase 4: Migration Planning (Proposed)
Proposed a migration roadmap with service-by-service equivalents: Kubernetes for ECS, self-hosted PostgreSQL for RDS, MinIO for S3, Cloudflare for CloudFront, and Grafana + Prometheus replacing CloudWatch. I left the plan with the team to take or leave.
Key Findings
of total spend on RDS alone
Databases were the single largest cost driver and likely over-provisioned. A managed PostgreSQL at a Swedish provider would cost a fraction.
potential monthly cost reduction
By migrating to a Swedish managed provider, the option I recommended for balancing savings with operational simplicity.
of spend on managed Redis
ElastiCache was one of the easiest quick wins: self-hosted Redis is trivial to run and nearly free.
Architecture Mapping
Current AWS Stack
ECS (containers) • RDS (databases) • ElastiCache (Redis)
CloudFront (CDN) • S3 (storage) • ELB (load balancing)
CloudWatch (monitoring) • NAT Gateway • Backup
↓ Proposed Migration Targets
Kubernetes / Docker Compose • PostgreSQL (dedicated) • Redis (self-hosted)
Cloudflare (CDN) • MinIO / Cloudflare R2 • Nginx / HAProxy
Grafana + Prometheus • Restic / Borg (backups)