Cloudflare R2 vs AWS S3 vs Backblaze B2: Object Storage in 2026
A detailed comparison of Cloudflare R2, AWS S3, and Backblaze B2 for object storage in 2026 — pricing, egress fees, S3 compatibility, performance, and which one wins for each use case.
Your S3 bill has a line item called "Data Transfer OUT" that makes no sense for backups you almost never retrieve. Cloudflare R2 and Backblaze B2 exist precisely because of that. Here is a complete comparison to help you pick the right object storage for each workload.
Pricing Breakdown (2026)
| AWS S3 | Cloudflare R2 | Backblaze B2 | |
|---|---|---|---|
| Storage (per GB/month) | $0.023 | $0.015 | $0.006 |
| Egress to internet | $0.09/GB (first 10TB) | $0.00 | $0.01/GB (first 1GB free daily) |
| Class A ops (PUT, POST) | $0.005/1k | $0.0036/1k | $0.004/1k |
| Class B ops (GET) | $0.0004/1k | $0.00036/1k | $0.004/1k |
| Free tier | 5GB storage, 20k GET | 10GB storage, 10M Class A, 10M Class B | 10GB storage |
The headline difference: R2 has zero egress fees. For media-heavy workloads, that single change can cut your storage bill by 60–80%.
S3 API Compatibility
All three support the S3 API — but the compatibility level varies.
AWS S3: The reference implementation. Every SDK, every tool, every tutorial assumes S3 by default.
Cloudflare R2: S3-compatible. Works with the AWS SDK by pointing the endpoint at your R2 endpoint:
import boto3
s3 = boto3.client(
"s3",
endpoint_url="https://<account-id>.r2.cloudflarestorage.com",
aws_access_key_id="<R2_ACCESS_KEY>",
aws_secret_access_key="<R2_SECRET_KEY>",
region_name="auto",
)
s3.upload_file("backup.tar.gz", "my-bucket", "backup.tar.gz")R2 does not support S3 Object Lock, S3 Intelligent-Tiering, S3 Replication, or multi-part upload listing in exactly the S3 way. For most workloads, these are not blockers.
Backblaze B2: Also S3-compatible via their S3-compatible API endpoint (s3.us-west-004.backblazeb2.com). The native B2 API is different but you can ignore it and use the S3 API:
aws s3 ls s3://my-b2-bucket \
--endpoint-url https://s3.us-west-004.backblazeb2.com \
--region us-west-004Durability and Availability
All three offer 11 nines (99.999999999%) durability — this is the industry standard achieved by replicating data across multiple physical locations.
Availability SLAs:
- S3 Standard: 99.99% availability
- R2: 99.9% availability (as of 2026)
- B2: 99.9% availability
For most workloads, 99.9% vs 99.99% does not matter. If you are building a primary database or high-frequency trading system on object storage, stick with S3.
Performance
Latency: S3 wins, especially for applications co-located in AWS. R2 benefits from Cloudflare's global edge network — reads via a public Cloudflare URL are served from the nearest PoP, which is fast. B2 has fewer datacenters (US West, US East, EU Central, AP Tokyo as of 2026).
Throughput: All three support parallel multipart uploads and can sustain very high throughput for large file transfers.
For CI/CD pipeline artifact caching (the most common DevOps use case), all three are fast enough. The latency difference is measured in tens of milliseconds, not seconds.
Use Cases and Who Wins Each
Terraform State Storage
Winner: AWS S3
Terraform's S3 backend has native DynamoDB locking, versioning, and encryption support. Migrating state to R2 or B2 requires more manual work and lacks the locking mechanism natively.
terraform {
backend "s3" {
bucket = "my-tf-state"
key = "prod/terraform.tfstate"
region = "ap-south-1"
dynamodb_table = "terraform-state-lock"
encrypt = true
}
}There is an S3-compatible backend workaround for R2, but it requires configuring skip_credentials_validation and skip_metadata_api_check flags — fine for teams comfortable with the tradeoff.
Static Website / CDN Origin
Winner: Cloudflare R2
R2 integrates directly with Cloudflare Pages and Workers. Zero egress means you never pay for CDN traffic. Enable public access on a bucket, point your Cloudflare zone at it, done:
# Enable R2 public access via Wrangler
wrangler r2 bucket create my-assets
# Configure custom domain in Cloudflare dashboard → R2 → Bucket → Settings → Custom DomainsBackup and Archive
Winner: Backblaze B2
At $0.006/GB for storage, B2 is the cheapest option for cold backups you rarely access. Egress is $0.01/GB but you only pay when restoring, which is infrequent.
# Restic backup to B2
restic -r b2:my-backup-bucket:/hostname init
restic -r b2:my-backup-bucket:/hostname backup /data
# Or via rclone
rclone sync /data b2:my-backup-bucket --progressB2 also has a partnership with Cloudflare: egress from B2 to Cloudflare is free (Bandwidth Alliance). So you can store in B2 and serve via Cloudflare CDN with zero egress cost.
Media Storage (User Uploads, Video, Images)
Winner: Cloudflare R2
If users upload and download files directly, egress from S3 will destroy your budget. R2's zero egress plus Cloudflare's image transformation (resize on the fly) makes it the clear winner.
CI/CD Artifact Cache
Winner: AWS S3 (if on AWS) / R2 (otherwise)
GitHub Actions native S3 caching and most CI platforms have first-class S3 support. If your infra is already in AWS, keep artifacts in S3 to avoid cross-cloud egress. If you are building cloud-agnostic pipelines, R2 is the better alternative.
Migration from S3 to R2
Use rclone for one-time migration:
# Configure both remotes
rclone config # add s3 remote and r2 remote
# Sync S3 → R2
rclone sync s3:my-old-bucket r2:my-new-bucket \
--transfers 20 \
--checkers 20 \
--progress
# Verify
rclone check s3:my-old-bucket r2:my-new-bucketEgress from S3 to the internet during migration is billed at S3 rates (~$0.09/GB). For a 1TB migration, that is ~$90 in one-time egress. Calculate this cost before deciding to migrate.
Decision Table
| Use case | Best choice |
|---|---|
| Terraform remote state | AWS S3 |
| CDN origin / zero egress | Cloudflare R2 |
| Cold backup / archive | Backblaze B2 |
| Media storage + transforms | Cloudflare R2 |
| Multi-region replication | AWS S3 |
| Budget-first, AWS workload | Backblaze B2 (via B2+Cloudflare) |
| AWS-native app | AWS S3 |
Final Verdict
For new projects with no AWS dependency, start with R2. Zero egress alone justifies it for any public-facing workload. For cold backups, B2 is the cheapest. S3 remains the safest choice when you need ecosystem maturity, AWS-native integrations, and compliance certifications.
Get started: Cloudflare R2 free tier, Backblaze B2 10GB free, AWS S3 console.
Today I Fixed
Short real fixes from production — posted daily
Stay ahead of the curve
Get the latest DevOps, Kubernetes, AWS, and AI/ML guides delivered straight to your inbox. No spam — just practical engineering content.
Related Articles
Cloud Costs Are Rising in 2026: The Complete FinOps Survival Guide for DevOps Teams
Cloud vendors are raising prices due to AI infrastructure costs. Here's a practical FinOps guide with specific strategies to cut your cloud bill by 30-50% in 2026.
FinOps for DevOps Engineers: How to Cut Cloud Bills by 40% in 2026
Cloud costs are out of control at most companies. FinOps is the discipline that fixes it — and DevOps engineers are the most important people in any FinOps implementation. Here is everything you need to know.
Kubernetes Cost Optimization — 10 Proven Strategies (2026)
Running Kubernetes in production can get expensive fast. Here are 10 battle-tested strategies to cut your K8s cloud bill by 40–70% without sacrificing reliability.