If you’re running a Next.js app or hosting large assets for your project, storage costs can add up quickly. I was spending $100+ every month on AWS S3 buckets until I discovered Cloudflare R2, which offers a more affordable and developer-friendly storage solution.
💰 The Cost Problem with AWS S3
- Storage fees added up as my project grew.
- Data egress charges made it unpredictable.
- Integrating with Vercel deployments wasn’t always smooth.
For my project, media and JSON files were being served thousands of times a day, and S3’s egress fees were killing my budget.
🚀 Why I Moved to Cloudflare R2
Cloudflare R2 instantly stood out because:
- No egress fees – you don’t pay extra for downloads.
- Seamless integration with Vercel and Next.js apps.
- Global CDN distribution through Cloudflare’s network.
- S3-compatible API so migration is easy.
⚙️ How I Switched from AWS S3 to Cloudflare R2
- Created an R2 bucket in Cloudflare dashboard.
- Generated API keys and credentials.
- Updated my
next.config.js
to allow R2-hosted media. - Pushed code via GitHub and deployed with Vercel.
📊 My Monthly Savings
Provider | Monthly Cost |
---|---|
AWS S3 + Egress | $120 |
Cloudflare R2 | $20 |
Total savings: $100/month 🎉
✅ Key Takeaways
- If your project is serving files at scale, Cloudflare R2 can save serious money.
- Migration is simple thanks to S3-compatible APIs.
- Performance actually improved due to Cloudflare’s CDN edge network.
🔗 Related Guides
Written by Oli Miah – sharing developer-friendly guides on cloud storage, Next.js, and Vercel.