r2 or s3+cloudfront for 8 tb a month of egress on a $400 budget Egress
Video course platform, small. About 8TB/month goes out to viewers and growing maybe 15% a month. Total infrastructure budget is $400 and right now egress alone would eat all of it on the setup I have.
Currently everything is in S3 and served directly, no CDN, which I now understand is the worst possible configuration. The question is whether to put CloudFront in front of it or move the objects to R2 and accept a migration.
Assets are about 600GB of MP4 that changes slowly. My encoding pipeline writes to S3 and I have a Lambda that triggers on object create for thumbnail generation.
What would you do with those constraints?
@egress_egon · 4mo ago · 3 replies
At 8TB and growing 15% a month, move. Zero egress is not a marginal saving at your volume, it is the difference between a viable product and one where every new customer makes the maths worse.
Rough monthly egress at list price for 8,000GB:
You pay storage on R2 either way - 600GB is roughly $9 - plus operations, which for video streaming are Class B and negligible. So your $400 budget goes from impossible to mostly unspent.
The honest reasons not to move:
Given you have exactly one Lambda hook, rewriting it is a day of work against $600 a month. That is not a close call.
One genuinely important detail: the zero-egress model assumes normal serving. Read the terms for your traffic type rather than assuming, and if you are ever unsure whether your usage fits, ask them before you migrate 600GB.
Reply
Report
@quietmargin · 4mo ago
One more thing to check before committing: whether you need signed URLs with short expiry for paid content, and that whatever you move to supports the exact shape of access control you use today. Getting the storage bill to zero and accidentally making your paid videos scrapeable is a bad trade.
Reply
Report
@carryon_only · 4mo ago
The thumbnail Lambda is the only AWS-specific thing in the whole pipeline and it is about 60 lines. Sounds like the migration is genuinely smaller than I had built it up to be.
Reply
Report