Cloudflare R2 vs AWS S3: Object Storage Compared (2026)

Category
Cloudflare R2
Published
April 6, 2026
Reading Time
8 min
Core Topic
Cloudflare R2 vs AWS S3 compared in 2026. Pricing, egress fees, performance, migration, and when to switch from S3 to R2 to eliminate bandwidth costs.
Back to Blog

Cloudflare R2 vs AWS S3: Object Storage Compared (2026)

GoITReels Editorial
8 min read

Cloudflare R2 vs AWS S3: Object Storage Compared (2026)

Object storage is one of the most universally needed cloud services — and one of the most surprisingly expensive when you factor in egress (outbound bandwidth) fees. Cloudflare R2 was designed specifically to compete with AWS S3 by eliminating egress costs entirely. In 2026, the R2 vs S3 decision has become one of the most financially significant architecture choices for high-traffic applications.

Quick answer: Cloudflare R2 is dramatically cheaper for read-heavy workloads where data is frequently served to users. AWS S3 remains the better choice for deep AWS ecosystem integration, advanced features, and workflows that stay within AWS infrastructure.

The Egress Cost Problem

Before comparing the services, it’s critical to understand the financial issue R2 was built to solve.

AWS S3 charges for egress (data transferred out of S3 to the internet or to other AWS regions):

  • $0.09/GB for data transferred out to the internet (first 10TB, US East)
  • Free only for data transferred to services within the same AWS region

For an application that stores and serves images, videos, or large files to end users, egress costs can dwarf storage costs:

Monthly TrafficS3 Egress CostR2 Egress Cost
100 GB served$9$0
1 TB served$92$0
10 TB served$920$0
100 TB served$9,200$0

R2 charges $0 for egress. Zero. The elimination of egress fees is R2’s entire value proposition.

Pricing Comparison: R2 vs S3

Cloudflare R2 Pricing

TierPrice
Storage$0.015/GB/month
Class A operations (PUT, COPY, POST, LIST)$4.50 per million
Class B operations (GET, SELECT)$0.36 per million
Egress (to internet)$0
Free tier10 GB storage, 1M Class A, 10M Class B per month

AWS S3 Pricing (US East)

TierPrice
Storage (first 50 TB)$0.023/GB/month
PUT, COPY, POST, LIST$5.00 per 1,000 requests ($5,000 per million)
GET and all others$0.40 per 1,000 requests ($400 per million)
Egress to internet (first 10 TB)$0.09/GB
Free tier5 GB, 20,000 GET, 2,000 PUT per month

Side-by-Side Storage Comparison

Cost ComponentAWS S3Cloudflare R2
Storage cost/GB/month$0.023$0.015
GET operations per million$0.40$0.36
PUT operations per million$5,000$4.50
Egress per GB$0.09$0

Wait — S3’s PUT cost looks much higher in this comparison because S3 charges per 1,000 requests ($0.005 each), while R2 charges per million ($4.50). That’s $4.50 per million for R2 vs $5,000 per million for S3? Let me clarify: S3 charges $0.005 per 1,000 PUT requests = $5.00 per million. R2 charges $4.50 per million. They’re actually comparable on operations. The real difference is always egress.

Real Cost Comparison: Media Hosting Example

Scenario: Application serving 10 TB/month of images and videos stored in object storage.

AWS S3 monthly cost:

  • Storage (2 TB stored): 2,000 GB × $0.023 = $46
  • GET requests (50M requests): 50,000 × $0.40 = $20
  • Egress (10 TB): 10,000 GB × $0.09 = $900
  • Total: ~$966/month

Cloudflare R2 monthly cost:

  • Storage (2 TB stored): 2,000 GB × $0.015 = $30
  • GET requests (50M requests): 50M × $0.00000036 = $18
  • Egress: $0
  • Total: ~$48/month

That’s a 20× cost difference for the same workload. For media-heavy applications, this is not theoretical — it’s real money.

Feature Comparison

FeatureAWS S3Cloudflare R2
Global availability33 regionsGlobal CDN edge (automatic)
Egress costs$0.09/GB$0
VersioningYesYes
Object lifecycle rulesYesYes
Server-side encryptionYes (AES-256, KMS)Yes (AES-256)
Pre-signed URLsYesYes
S3-compatible APINativeYes (compatible)
CORS configurationYesYes
Event notificationsYes (S3 Event Notifications)Yes (Event Notifications)
ReplicationMulti-regionMulti-region (via Cloudflare)
Static website hostingYesYes
AnalyticsS3 Storage LensBasic
Intelligent TieringYesNo (single tier)
Glacier (archival)YesNo
Lambda triggersFirst-classLimited (Workers)

S3 wins on features for AWS-native workflows. R2 wins on cost for high-egress use cases. The APIs are compatible enough that migration is straightforward.

R2’s S3 Compatibility

Cloudflare R2 implements the S3 API. This means existing S3 code works with R2 by changing the endpoint URL. For the AWS SDK:

import { S3Client } from "@aws-sdk/client-s3";

// AWS S3
const s3 = new S3Client({ region: "us-east-1" });

// Cloudflare R2 — same SDK, different endpoint + credentials
const r2 = new S3Client({
  region: "auto",
  endpoint: `https://${ACCOUNT_ID}.r2.cloudflarestorage.com`,
  credentials: {
    accessKeyId: R2_ACCESS_KEY_ID,
    secretAccessKey: R2_SECRET_ACCESS_KEY,
  },
});

Migration effort: update the endpoint URL, create R2 API tokens, run your existing upload/download code unchanged. For most applications, this is a half-day migration.

When Cloudflare R2 Wins

Choose R2 when:

  1. You serve files directly to users. Images, videos, PDFs, downloads — anything where data leaves storage and goes to browsers. R2 egress is free; S3 egress is expensive.

  2. You’re building on Cloudflare Workers. R2 and Workers are designed together. Reading R2 objects from Workers is fast, native, and has no egress cost.

  3. You want to host a static site with large assets. R2 + Cloudflare Pages = globally cached content with zero egress cost at any scale.

  4. You want to reduce AWS costs without changing architecture. Swap the S3 endpoint, keep the same SDK — instant savings on egress.

  5. You’re building a media platform. User-uploaded content served to viewers is the canonical R2 use case.

When AWS S3 Wins

Choose S3 when:

  1. Your data stays within AWS. If your EC2/Lambda/ECS services read from S3 within the same region, egress is free in S3 too. The cost advantage of R2 only kicks in when data leaves AWS.

  2. You need deep AWS integration. S3 event notifications triggering Lambda, Athena queries on S3 data, Glue ETL jobs, SageMaker training data — the AWS ecosystem is deeply integrated with S3.

  3. You need advanced features. S3 Intelligent Tiering, Glacier for archival, Storage Lens analytics, Cross-Region Replication with compliance tracking — these have no R2 equivalent.

  4. You’re doing analytics on the data. S3 + Athena + Glue is a powerful data lake stack. R2 lacks this ecosystem.

  5. Your team already runs everything on AWS and the operational overhead of a separate Cloudflare service isn’t worth the savings.

Migration Guide: S3 to R2

If R2’s pricing makes sense for your workload, migration is straightforward:

Step 1: Create an R2 bucket Cloudflare Dashboard → R2 → Create bucket

Step 2: Generate R2 API tokens R2 → Manage R2 API Tokens → Create token with Object Read/Write permissions

Step 3: Copy existing data Use rclone to mirror your S3 bucket to R2:

rclone copy s3:your-bucket r2:your-r2-bucket --progress

Step 4: Update your application Change the S3 endpoint URL in your SDK configuration. Most code runs unchanged.

Step 5: Update DNS (if serving via custom domain) R2 allows custom domains via Cloudflare DNS. Point your asset domain at R2 for the full CDN + zero-egress benefit.

Step 6: Validate and cut over Run both in parallel for a period, validate R2 is serving correctly, then update application code to use R2 for new writes and complete the transition.

Practical Recommendation

For new projects: start with R2 if you’re serving files to users. The pricing advantage is significant and the S3 API compatibility means you’re not locked in.

For existing S3 users: calculate your egress costs. If you’re paying more than $20/month in egress, the migration math is simple. Pull your S3 Cost Explorer data, look at “Data Transfer Out to Internet,” and compare to R2’s $0.

For AWS-native data workloads (ETL, analytics, ML training data): stay on S3. The ecosystem integration, advanced features, and free intra-AWS egress make S3 the right choice for data that doesn’t leave AWS.

Bottom Line

Cloudflare R2 eliminates the most painful cost in object storage for user-facing applications. If you’re paying four-figure monthly S3 egress bills for serving media or downloads to users, R2 migration is one of the most impactful cost-reduction steps available in 2026.

AWS S3 remains the better choice for deep AWS integration, advanced data lifecycle management, and workloads that stay within the AWS network.

The good news: R2’s S3 API compatibility makes the decision reversible. Start with R2, measure the cost savings, and you can always migrate back if your architecture changes.

Explore Cloudflare R2 → | Explore AWS →