Migrating from Heroku to AWS: lessons learned
- 15 Apr 2024 |
- 01 Min read
Leading the migration from Heroku to AWS at Heard was one of the most challenging infrastructure projects I've managed. We cut costs by 20% and improved uptime from 97.5% to 99.9%, but the journey was complex.
Why Migrate?
Heroku was great for getting started, but as we scaled:
- Costs grew faster than revenue
- Limited control over infrastructure
- Performance bottlenecks
- Compliance requirements needed more control
The Migration Strategy
We used a phased approach:
- Assessment: Inventory all services and dependencies
- Parallel Run: Run both environments simultaneously
- Gradual Cutover: Move services one by one
- Optimization: Tune AWS services for cost and performance
Key Decisions
ECS vs EC2: Chose ECS for container orchestration RDS vs Self-Managed: RDS for managed Postgres CloudFront: For CDN and caching Terraform: Infrastructure as code
Challenges
- Database migration was the hardest part
- DNS cutover timing
- Team training on AWS services
- Monitoring and alerting setup
Results
- 20% cost reduction
- 99.9% uptime (up from 97.5%)
- Better performance and scalability
- More control over infrastructure
Lessons
- Plan for 2x the time you think you need
- Test migrations thoroughly in staging
- Have rollback plans for every step
- Communicate progress regularly
- Invest in monitoring from day one
"A successful migration is one where users don't notice it happened."