Cloudflare R2 vs S3: Egress-Free Object Storage in Practice
R2 charges nothing for egress, and for read-heavy buckets that is most of the bill. Here's where R2 wins, and where we'd keep S3 anyway.
Key takeaways
- Cloudflare R2 is cheaper than S3 for read-heavy public data because R2 egress is free, while S3 charges $0.09 per GB for the first 10 TB out to the internet.
- R2 storage is $0.015 per GB-month against $0.023 for S3 Standard.
- Keep cold archives, versioned buckets and Lambda event pipelines on S3.
On this page
Pick R2 for hot, read-heavy data served to the internet: R2 egress is free, while S3 charges $0.09 per GB for the first 10 TB out each month (US East, as of October 2026). Keep S3 for deep archives, versioned buckets, and S3-to-Lambda event pipelines. Migration is mostly an endpoint swap, because R2 speaks the S3 API.
Verified against
Cloudflare R2 pricing and S3 API compatibility pages, Amazon S3 pricing for US East (N. Virginia), rclone S3 backend docs. Checked October 2026.
Most S3 bills for user media look the same once you open them: storage is the small line and data transfer out is the big one. Every image a user loads is billed by the gigabyte. That is the bill R2 deletes, and it is why the comparison is less close than the per-GB storage prices suggest.
The egress math is the whole story
R2 Standard storage is $0.015 per GB-month. S3 Standard in US East is $0.023 per GB-month for the first 50 TB. That is a modest gap. The real gap is egress: S3 gives you 100 GB a month free, then charges $0.09 per GB for the next 10 TB, $0.085 for the next 40 TB, and less beyond that. R2 charges $0 to the internet on both of its storage classes.
| Option | Storage (per GB-month) | Egress to internet | Requests (writes / reads per million) | Archive tier | Best fit |
|---|---|---|---|---|---|
| Cloudflare R2 Standard | $0.015 | Free | $4.50 / $0.36 | None | Hot media, downloads, public assets |
| Cloudflare R2 Infrequent Access | $0.01 (plus $0.01/GB retrieval, 30-day minimum) | Free | $9.00 / $0.90 | None | Warm data read occasionally |
| Amazon S3 Standard | $0.023 (first 50 TB) | $0.09/GB first 10 TB, then tiered down | Billed per request class | Glacier classes | AWS-native pipelines, compliance |
| S3 Intelligent-Tiering Deep Archive Access | $0.00099 | Same as S3 | Billed per request class | Is the archive | Data touched once a year |
Prices are list prices as of October 2026; S3 figures are US East (N. Virginia).
A worked example, list prices only: a 40 TB bucket that serves 50 TB a month to the internet. On S3 that is about $940 of storage plus about $4,400 of egress, roughly $5,300 a month before request charges. On R2 it is about $615 of storage and zero egress. A CDN in front of S3 cuts origin pulls, but CloudFront has its own transfer pricing, so the egress line shrinks rather than disappears. For a bucket that is read far more than it is written, egress dwarfs storage, and that is exactly where R2 wins. We walk through the other places this line hides in data transfer and egress costs.
R2 speaks S3, which makes migration boring in a good way
R2 implements the S3 API, so most tooling works with an endpoint swap. rclone handles the copy and the verification pass:
rclone copy s3remote:devopsness-media r2remote:devopsness-media \
--transfers 32 --checkers 64 --fast-list --progress
rclone check s3remote:devopsness-media r2remote:devopsness-media --one-way
Config is two remotes, with the R2 one pointed at your account's endpoint and provider = Cloudflare:
[r2remote]
type = s3
provider = Cloudflare
access_key_id = <r2-access-key>
secret_access_key = <r2-secret>
endpoint = https://<account-id>.r2.cloudflarestorage.com
Your application SDK code mostly does not change either. The AWS SDK works against R2 if you override the endpoint. R2's region is auto; an empty value and us-east-1 are aliased to it:
import boto3
s3 = boto3.client(
"s3",
endpoint_url="https://<account-id>.r2.cloudflarestorage.com",
aws_access_key_id=R2_KEY,
aws_secret_access_key=R2_SECRET,
region_name="auto",
)
That S3 compatibility is R2's best feature. For a plain media bucket, the migration is a weekend of copying and a config change, not a rewrite of your object layer.
Where R2 bites
Four things, all documented, all worth checking before you move a bucket.
No archive tier. R2 has two storage classes, Standard and Infrequent Access. There is no Glacier equivalent. A compliance archive you touch once a year belongs on S3's deep archive tiers at about $0.00099 per GB-month, which R2 cannot approach. R2 is for data that is read.
Missing S3 features. Cloudflare's S3 compatibility page lists bucket versioning and object ACLs as unimplemented. If your recovery story is "turn on versioning and restore the old object", or a legacy client sets x-amz-acl on upload, that path does not port. Read the compatibility table against the API calls your code actually makes.
Events go to Queues, not Lambda. S3 has a decade of event integrations into Lambda, SNS, SQS and EventBridge. R2 event notifications fire on object-create and object-delete and deliver only to Cloudflare Queues, which you consume with a Worker or over HTTP pull. If a thumbnail pipeline is built on S3 events into Lambda, keep that bucket on S3 or plan the rebuild.
Multipart edge cases. Uploading to the same part number replaces the previous part, and some headers (conditional copy-source on UploadPartCopy, several checksum headers) are not implemented. Checksum algorithm support also differs from S3. Test your large-object path explicitly rather than assuming identical behavior.
Serving: R2 plus Workers beats origin pulls
The clean setup is R2 as origin behind Cloudflare's CDN, so reads come from cache at the edge and misses hit R2 at zero egress. Bind the bucket to a Worker and skip signed-URL round trips for public assets:
export default {
async fetch(request, env) {
const key = new URL(request.url).pathname.slice(1);
const object = await env.MEDIA.get(key);
if (!object) return new Response("Not found", { status: 404 });
return new Response(object.body, {
headers: { "Cache-Control": "public, max-age=86400" },
});
},
};
Reads are not free, though. Each Worker get on a cache miss is a Class B operation at $0.36 per million, so a cache that never warms still costs something. What changes is the shape of the problem: with S3 plus CloudFront, a poor cache hit ratio costs egress; with R2, it mostly costs latency. You tune the cache for users, not to dodge a bill. If you are still deciding how the edge layer works, what a CDN actually does covers the basics.
The decision, concretely
- Serving media, downloads or public assets with high read volume? Use R2. The egress line goes to zero and storage gets cheaper too.
- Holding compliance archives you rarely read? Keep them on S3's archive tiers. R2 has nothing in that price range.
- Relying on bucket versioning or S3 events into Lambda? Keep that bucket on S3, or budget for rebuilding the pipeline on Queues and Workers.
- Already deep in S3 storage classes and lifecycle rules? Read S3 cost traps in storage classes and requests first; sometimes the fix is a lifecycle policy, not a migration.
Questions people ask
Is Cloudflare R2 really free for egress?
Yes, for data transfer to the internet. Cloudflare's pricing page lists egress as free for both R2 Standard and Infrequent Access, as of October 2026. You still pay for storage ($0.015 per GB-month on Standard) and for operations: $4.50 per million Class A writes and $0.36 per million Class B reads. Infrequent Access adds a $0.01 per GB retrieval fee and a 30-day minimum storage duration.
Can I use the AWS SDK and CLI with Cloudflare R2?
Yes. R2 implements the S3 API, so boto3, the AWS CLI, and tools like rclone work once you set the endpoint to https://<account-id>.r2.cloudflarestorage.com and the region to auto. Some S3 features are not implemented, including bucket versioning and object ACLs, and only the STANDARD and STANDARD_IA storage classes are accepted. Check Cloudflare's compatibility table against the calls your code makes.
When is S3 cheaper than R2?
When the data is rarely read. S3's deep archive tier costs about $0.00099 per GB-month, roughly fifteen times less than R2 Standard, and egress does not matter if nobody downloads the objects. S3 also wins when traffic stays inside AWS, for example EC2 or Lambda in the same region reading the bucket, because that transfer does not hit the internet egress tiers.
The call we'd make
If you serve a lot of read-heavy data over the internet, move it to R2 and pocket the egress savings; on list prices, a bucket serving 50 TB a month saves thousands of dollars monthly. The S3-compatible API makes the migration a weekend, not a quarter. Keep cold archives on S3's archive tiers, keep any bucket that depends on versioning or Lambda events, and test multipart uploads before you cut over. R2 is not a total S3 replacement. For the hot, egress-heavy part of your object storage, it is an easy win.
Sources
Cite this article
Kiril Urbonas (2026). Cloudflare R2 vs S3: Egress-Free Object Storage in Practice. DevOpsNess. Updated 2026-11-15. https://www.devopsness.com/blog/cloudflare-r2-vs-s3-egress-free-object-storage
[Cloudflare R2 vs S3: Egress-Free Object Storage in Practice](https://www.devopsness.com/blog/cloudflare-r2-vs-s3-egress-free-object-storage) (Kiril Urbonas, DevOpsNess, updated 2026-11-15)
More from Cloud
Explore more articles in this category
Catching AWS Cost Spikes Before the Invoice
The bill arrives weeks late. By then a runaway logging pipeline has already burned thousands. Here is how to catch spikes in hours, not weeks.
AWS Lambda: Deploy Your First Serverless Function
Write, package, and deploy a Lambda function using only the AWS CLI. Trigger it via a public URL. Understand what serverless actually means.
Grafana vs Kibana: Which Dashboard Tool
Grafana pulls metrics from anywhere, Kibana lives and dies with Elasticsearch. Here's how we pick between them without ending up running both by accident.
You might have missed
Evergreen posts worth revisiting.