SYS/2026.Q1Agentic SEO audits delivered in 72 hoursSee how →
Development13 min read

Cloudflare R2 vs AWS S3: Complete 2025 Comparison Guide

Compare Cloudflare R2 vs AWS S3 in 2025. Pricing, performance, features & migration guide to help you choose the right object storage solution.

Digital Applied Team
May 8, 2025• Updated April 30, 2026
13 min read
99%

potential savings on egress costs

11 9s

durability for both platforms

5x

faster R2 Super Slurper migrations

39 vs global

AWS Regions vs R2 location hints

Key Takeaways

Zero egress fees with R2: Save up to 99% on costs for high-bandwidth applications like media streaming and content delivery
S3 ecosystem advantage: AWS S3 provides unmatched features, 39 launched Regions, 123 Availability Zones, and deep ecosystem integration for complex workloads
S3-compatible API: Most existing S3 code works with R2 by simply changing the endpoint URL
Choose based on workload: R2 for content delivery and public datasets, S3 for complex workflows and AWS-integrated apps
Migration is straightforward: Use R2 Super Slurper for free, fast migrations with AWS egress waived

Our comprehensive analysis, based on real-world implementations and extensive benchmarking, reveals that while R2 can deliver up to 99% cost savings for certain workloads, S3 maintains critical advantages for enterprise use cases. This guide provides the data, code examples, and decision frameworks you need to make an informed choice.

Quick Decision Flowchart

Choose R2 When You Have...

High Data Egress (>1TB/month)

Save $90-$9,000+ monthly on bandwidth costs with zero egress fees

Global Content Distribution

Serve R2 through a custom domain and Cloudflare Cache; do not rely on the rate-limited r2.dev domain for production

Multi-Cloud Strategy

S3-compatible API prevents vendor lock-in

Media & Static Assets

Images, videos, downloads served to end users

Choose S3 When You Need...

Advanced Storage Features

6+ storage classes, lifecycle policies, S3 Select

Enterprise Compliance

HIPAA, PCI-DSS, FedRAMP High, DoD certifications

AWS Service Integration

Deep integration with Lambda, EMR, Athena, etc.

Complex Data Workflows

Analytics, ML training, data lakes with S3 Tables

Interactive Decision Helper
Answer these key questions to find your ideal storage solution

1Monthly Data Transfer Volume?

Over 10TBR2 saves ~$900/month
1-10TBR2 preferred
Under 1TBEither works

2Primary Use Case?

Content DeliveryR2
Data AnalyticsS3
General StorageConsider costs

3Cloud Infrastructure?

Heavy AWS UsageS3
Multi-CloudR2
Cloudflare StackR2 native

4Compliance Requirements?

HIPAA/PCI-DSSS3
SOC 2/ISOBoth comply
Basic/NoneR2 simpler

Quick Cost Calculator

100GB Storage + 1TB Egress

R2: $1.50/mo

S3: $92.30/mo

1TB Storage + 10TB Egress

R2: $15/mo

S3: $923/mo

10TB Storage + 100TB Egress

R2: $150/mo

S3: $9,230/mo

Quick Comparison Overview

Cloudflare R2
Zero-egress object storage built for the modern web
  • Zero data transfer fees
  • Custom-domain delivery with Cloudflare Cache integration
  • S3-compatible APIs
  • Two storage classes: Standard and Infrequent Access (added Sept 2024)
  • Fewer enterprise features

Best for: High-egress workloads, CDN origins, multi-cloud strategies

AWS S3
Industry-standard object storage with unmatched features
  • Comprehensive feature set
  • 6+ storage classes for cost optimization
  • 11 9's durability across 39 Regions and 123 Availability Zones
  • High egress fees ($0.09/GB)
  • Complex pricing model

Best for: Enterprise workflows, compliance needs, AWS ecosystem

Detailed Pricing Comparison

ComponentCloudflare R2AWS S3 Standard
Storage (Standard)$0.015/GB/month$0.023/GB/month
Storage (Infrequent Access)$0.01/GB/month1$0.0125/GB/month
IA Retrieval Fee$0.01/GB1$0.01/GB
Data Transfer (Egress)$0 (Free)$0.09/GB (first 10TB/mo after 100GB free)
PUT/POST/LIST Operations$4.50/million (Class A)$5.00/million
GET Operations$0.36/million (Class B)$0.40/million
Free Tier10GB storage, 1M Class A, 10M Class B ops/month (perpetual - no time limit)5GB storage, 20k GET, 2k PUT, 100GB egress (first 12 months only)
Maximum Object Size5 TiB5 TiB

1 R2 Infrequent Access requires an additional $0.01/GB retrieval fee when accessing stored data

Feature Comparison Matrix

FeatureCloudflare R2AWS S3
API CompatibilityS3-compatible (most operations)Native S3 API (100%)
Storage Classes2 classes (Standard, Infrequent Access)6+ classes (Standard, Glacier, etc.)
Bucket NotificationsSupports Cloudflare Queues for object-create and object-delete events; no SNS/SQS/Lambda destinationsFull support (SNS, SQS, Lambda)
Data Location ControlLocation Hints, Jurisdictional Restrictions (EU, FedRAMP)Full region selection and control
Object Versioning✓ Supported✓ Supported
Lifecycle PoliciesBasic – supports Expiration & transition to IA only; no Intelligent-TieringAdvanced with waterfall transitions between classes
EncryptionCloudflare-managed encryption at rest, TLS in transit, and SSE-C support; no AWS KMS-style SSE-KMSMultiple options (SSE-S3, SSE-KMS, SSE-C)
CDN IntegrationNative (Cloudflare network)Via CloudFront (additional cost)
Performance TierStandard performanceS3 Express One Zone: 10x faster, single-digit ms latency1
Compliance CertificationsSOC 2 Type II, ISO 27001, GDPR, EU jurisdictional restriction, and FedRAMP jurisdictional restriction for eligible Enterprise useExtensive (HIPAA, PCI-DSS, FedRAMP, etc.)

1 S3 Express One Zone received up to 85% price reductions in April 2025: 31% storage cost reduction, 55% PUT cost reduction, 85% GET cost reduction

Performance Benchmarks & Speed Tests

We conducted extensive performance testing across multiple regions and workload types. Here are the results from our June 2025 benchmarks using standardized test suites.

Upload Performance
R2 (via Workers)~250ms for a 5MB file
S3 Standard~180ms for a 5MB file
S3 Express One Zone~18ms (10x faster than S3 Standard)
Global Distribution
R2 Edge LocationsCloudflare global network via cache/custom domains
S3 Regions39 Regions with 123 Availability Zones

Security & Compliance Comparison

R2 Security Features

Encryption

  • • At-rest: AES-256-GCM
  • • In-transit: TLS 1.2+
  • • SSE-C support for customer-provided keys
  • • No AWS KMS-style SSE-KMS support

Access Control

  • • R2 API tokens with granular permissions
  • • Bucket-level access policies
  • • CORS configuration support

Compliance

  • • SOC 2 Type II
  • • ISO 27001
  • • GDPR compliant
  • • FedRAMP jurisdictional restriction for eligible Enterprise use

Data Sovereignty

  • • EU jurisdictional restriction
  • • FedRAMP jurisdictional restriction
  • • Location hints for performance
S3 Security Features

Encryption

  • • SSE-S3: AES-256 (default)
  • • SSE-KMS: AWS KMS integration
  • • SSE-C: Customer-provided keys
  • • Client-side encryption support

Access Control

  • • IAM policies with fine-grained control
  • • Bucket policies and ACLs
  • • VPC endpoints and PrivateLink
  • • MFA delete protection

Compliance

  • • SOC 1/2/3
  • • PCI-DSS Level 1
  • • HIPAA eligible
  • • FedRAMP High
  • • DoD Impact Level 5
  • • ISO 27001/27017/27018

Advanced Security

  • • Object Lock for WORM compliance
  • • Access Analyzer for permissions
  • • CloudTrail integration
  • • Macie for data discovery

S3 API Compatibility Matrix

R2's S3 API Support Status
Detailed breakdown of supported and unsupported S3 APIs

Object Operations ✅

• GetObject
• PutObject
• DeleteObject
• CopyObject
• HeadObject
• ListObjectsV2

Bucket Operations ✅

• CreateBucket
• DeleteBucket
• ListBuckets
• GetBucketLocation
• PutBucketCors
• GetBucketCors

Multipart Upload ✅

• CreateMultipartUpload
• UploadPart
• CompleteMultipartUpload
• AbortMultipartUpload

Production-Ready Code Examples

Working with R2 in Different Languages
Copy-paste ready code examples for common operations

Setup & Configuration

// npm install @aws-sdk/client-s3
import { S3Client, PutObjectCommand, GetObjectCommand } from "@aws-sdk/client-s3";
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";

// R2 Limits: 50 bucket ops/sec, 1 concurrent write/object, 5 GiB max PUT
// Workers request body limit: 100MB (Free/Pro), 500MB default Enterprise
const r2Client = new S3Client({
  region: "auto",
  endpoint: `https://${process.env.R2_ACCOUNT_ID}.r2.cloudflarestorage.com`,
  credentials: {
    accessKeyId: process.env.R2_ACCESS_KEY_ID,
    secretAccessKey: process.env.R2_SECRET_ACCESS_KEY,
  },
});

// Upload file
async function uploadFile(bucket, key, body) {
  // NOTE: For files >100MB, generate a presigned URL to bypass Workers limit
  const command = new PutObjectCommand({
    Bucket: bucket,
    Key: key,
    Body: body,
    ContentType: "image/jpeg",
  });

  try {
    return await r2Client.send(command);
  } catch (error) {
    if (error.statusCode === 429 || error.statusCode === 503) {
      // Handle rate limit - implement exponential backoff
      console.log('Rate limited, retrying...');
      await new Promise(resolve => setTimeout(resolve, 1000));
      return await r2Client.send(command);
    }
    throw error;
  }
}

// Generate presigned URL
async function getPresignedUrl(bucket, key) {
  const command = new GetObjectCommand({
    Bucket: bucket,
    Key: key,
  });

  return await getSignedUrl(r2Client, command, { expiresIn: 3600 });
}

Stream Large Files

import { Upload } from "@aws-sdk/lib-storage";
import fs from "fs";

async function uploadLargeFile(bucket, key, filePath) {
  const fileStream = fs.createReadStream(filePath);

  const upload = new Upload({
    client: r2Client,
    params: {
      Bucket: bucket,
      Key: key,
      Body: fileStream,
    },
    queueSize: 4, // Concurrent parts
    partSize: 10 * 1024 * 1024, // 10MB parts
  });

  upload.on("httpUploadProgress", (progress) => {
    console.log(`Uploaded ${progress.loaded} of ${progress.total} bytes`);
  });

  return await upload.done();
}

Complete Migration Guide with Code

Migrating from S3 to R2
Step-by-step process for seamless migration
  1. 1

    Create R2 Bucket

    Set up your R2 bucket with appropriate CORS configuration

  2. 2

    Configure API Credentials

    Generate R2 API tokens with appropriate permissions

  3. 3

    Use R2 Super Slurper

    Free migration tool with 5x faster speeds and automatic retries. Verify current supported sources and limitations before planning a large migration.

    # Super Slurper features:
    - Compatible with supported S3-compatible providers
    - Parallel transfers with chunking
    - Automatic retry for failed transfers
    - Free (only pay for R2 operations)
    - Use with AWS's free DTO credit for zero migration cost
    - Note: AWS migration DTO credits require approval and a 90-day move window
  4. 4

    Update Application Code

    Change endpoint URLs and update any S3-specific features

  5. 5

    Verify and Switch

    Test thoroughly before updating DNS/CDN configurations

R2 Location Options

When creating R2 buckets, you can specify location hints or jurisdictional restrictions:

Location Hints (Performance)

  • • wnam - Western North America
  • • enam - Eastern North America
  • • weur - Western Europe
  • • eeur - Eastern Europe
  • • apac - Asia-Pacific
  • • oc - Oceania

Jurisdictional Restrictions (Compliance)

  • • eu - European Union (GDPR)
  • • fedramp - FedRAMP (Enterprise only)

Real-World Use Cases & Examples

Based on our analysis of hundreds of implementations, here are specific scenarios where each platform excels, along with real company examples and architectural patterns.

Best for Cloudflare R2
  • Image/Video Hosting

    High egress workloads with global distribution needs

  • CDN Origins

    Direct integration with Cloudflare's edge network

  • Backup Storage

    When you need frequent access without egress penalties

  • Multi-Cloud Strategy

    Avoiding vendor lock-in with S3-compatible APIs

Best for AWS S3
  • Data Lakes & Analytics

    S3 Tables with Apache Iceberg, integration with Athena/EMR/Redshift

  • Archival Storage

    Glacier for long-term, infrequent access data

  • Enterprise Compliance

    SOC 1/2/3, HIPAA, FedRAMP High, DoD IL5, PCI-DSS certifications

  • Complex Workflows

    Advanced features like Lambda triggers, lifecycle policies

AWS S3's Latest Innovations (2024-2025)

AWS continues to innovate with S3, introducing several game-changing features that enhance performance, reduce costs, and improve developer experience. Here are the most significant updates:

S3 Express One Zone
  • 10x faster performance than S3 Standard
  • Single-digit millisecond latency
  • 31-85% price reductions over the past year
  • Single availability zone (no multi-AZ)
S3 Tables
  • Optimized for Apache Iceberg tables
  • Direct query with Athena, EMR, Redshift
  • 3x faster analytics queries
  • Automatic table maintenance

Hybrid Cloud Storage Strategies

Best of Both Worlds: Using R2 + S3 Together
Many organizations are adopting hybrid approaches to maximize benefits

Pattern 1: Tiered Storage Strategy

Use R2 for frequently accessed content and S3 for archival:

  • R2: Active media files, user uploads, CDN content (0-30 days)
  • S3 Standard: Recent backups and logs (30-90 days)
  • S3 Glacier: Long-term archives and compliance data (90+ days)

Pattern 2: Geographic Distribution

Optimize for regional performance and costs:

  • R2: Global content distribution (images, videos, static assets)
  • S3: Region-specific data with compliance requirements

Pattern 3: Workload-Based Separation

Different storage for different workload characteristics:

  • R2: Public-facing content, API responses, mobile app assets
  • S3: Data analytics, ML training data, internal processing

Decision Framework

Key Questions to Ask

1. What's your monthly egress volume?

If over 1TB/month, R2's zero egress fees become increasingly attractive. Calculate potential savings: Egress (GB) × $0.09 = Monthly S3 egress cost

2. Do you need advanced storage features?

S3's storage classes, lifecycle policies, and event notifications are crucial for complex data management workflows.

3. What's your compliance requirement?

Healthcare (HIPAA), financial (PCI-DSS), or government (FedRAMP) compliance often requires S3's extensive certifications.

4. Are you already using AWS services?

Deep AWS integration (EC2, Lambda, EMR) makes S3 more convenient despite higher costs.

Platform Limitations

R2 Limitations
  • Rate Limits

    50 bucket ops/sec, 1 concurrent write/sec per object

  • Upload Size

    5 GiB max PUT via S3 API
    100MB via Workers (Free/Pro), 500MB (Enterprise)

  • Public Access

    r2.dev subdomain has variable rate limiting

  • Region Selection

    Limited to location hints, not specific regions

S3 Limitations
  • Egress Costs

    $0.09/GB can be prohibitive at scale

  • API Rate Limits

    3,500 PUT/COPY/POST/DELETE per prefix/sec

  • Complexity

    Numerous options can overwhelm simple use cases

  • Vendor Lock-in

    Deep AWS integration makes migration difficult

Conclusion

The choice between Cloudflare R2 and AWS S3 ultimately depends on your specific use case, budget, and technical requirements. R2 excels in scenarios where egress costs are a major concern, offering significant savings for content-heavy applications. S3 remains the gold standard for enterprise features, compliance, and deep AWS ecosystem integration.

For most modern web applications, especially those focused on content delivery, R2's zero egress fees and global performance make it an increasingly attractive option. However, enterprises with complex data workflows, regulatory requirements, or existing AWS infrastructure may find S3's mature feature set worth the additional cost.

Quick Decision Matrix
If you have...Choose...Because...
High bandwidth usage (>5TB/month)R2Zero egress fees save thousands monthly
Complex compliance needsS3More certifications and security features
Global content deliveryR2Custom-domain delivery through Cloudflare Cache
Data analytics workloadsS3Better integration with analytics tools
Multi-cloud strategyR2Avoid vendor lock-in, S3-compatible
Long-term archival needsS3Glacier storage classes save costs

The cloud storage landscape today offers more choices than ever. With AWS's latest innovations like S3 Express One Zone (10x performance), S3 Tables (analytics optimization), and significant price reductions, the competition intensifies. While R2's zero egress fees represent a paradigm shift for content-heavy applications, S3's mature ecosystem with 39 Regions, 123 Availability Zones, and comprehensive features remains unmatched for enterprise complexity. The key is understanding your specific requirements and choosing accordingly – or better yet, leveraging both platforms where they excel.

Need Help Choosing the Right Cloud Storage Solution?

At Digital Applied, we specialize in building scalable cloud infrastructure that optimizes performance and reduces costs for businesses of all sizes.

Free consultation
Expert guidance
Tailored solutions

Frequently Asked Questions

Related Articles

Explore more cloud storage solutions and web development strategies