Cloudflare R2 vs. AWS S3 + CloudFront CDN Cost Calculator: Zero-Egress vs. Class A/B Operations & Cache-Hit Ratio Break-Even
AWS S3 waives data transfer fees to CloudFront, but still bills $85/TB ($0.085/GB) at the CDN edge plus $0.0100 per 10,000 HTTPS requests ($1.00/Million) and S3 origin GET/PUT fees on cache misses. Cloudflare R2 eliminates egress fees entirely ($0.00/GB) and stores data at $15/TB/mo vs. S3 Standard’s $23/TB/mo—yet R2’s $4.50/Million Class A mutating operations and $0.36/Million Class B reads can dominate bills for millions-of-tiny-files telemetry workloads. Audit your exact crossover point below.
Compare R2 against either S3 + CloudFront (best practice) or direct S3 bucket egress.
2. Live Cloud Storage & CDN Cost Breakdown
DEPLOY ON CLOUDFLARE R2
Cloudflare R2 Saves $1,769/mo ($21,228/yr)
Zero egress fees eliminate $1,615/mo in AWS CloudFront bandwidth charges while cutting base storage cost by 34.8%.
Monthly AWS S3 + CloudFront Bill
$2,043.70
Storage: $345 | Egress: $1,615 | Ops: $84
Monthly Cloudflare R2 Bill
$256.50
Storage: $225 | Egress: $0 | Ops: $32
Egress Fee Eliminated
$1,615.00/mo
$19,380/yr saved at 20 TB/mo outbound
Class A/B Request Cost Share
12.3% of R2 Bill
R2 Ops: $31.50 vs. AWS Ops: $83.70
What Would Change the Answer? (Class A/B vs. Egress Crossover):Because Cloudflare R2 storage ($15/TB) and Class A writes ($4.50/M vs. S3 $5.00/M) are both cheaper than AWS S3 Standard, R2 wins at every positive egress level. However, if you batch-upload millions of tiny <4 KB IoT files without aggregating them, Class A PUT operations ($4.50/M) can exceed your raw storage bill once writes surpass 3.33 Million PUTs per stored TB.
3. Workload Comparison: Video/Media Delivery vs. AI Datasets vs. High-Frequency Small-File Writes
Object storage bills are governed by three orthogonal pricing vectors: base capacity ($/TB-month), outbound egress ($/GB transferred to the internet), and API request density (Class A mutating PUT/LIST vs. Class B read GET/HEAD). The table below benchmarks how AWS S3 Standard (Direct), AWS S3 + CloudFront CDN, and Cloudflare R2 behave across three real-world production profiles.
Workload Profile & Traffic Mix
AWS S3 Standard (Direct Bucket Egress)
AWS S3 Standard + CloudFront CDN
Cloudflare R2 + Cloudflare CDN Edge
Engineering Verdict & Optimization
1. Video / Media Delivery (25 TB Stored, 80 TB/mo Egress, 90% Cache-Hit, 2M PUTs, 20M GETs)
$849.90/mo ($30 storage + $0 egress + $805.50 Class A PUTs + $14.40 Class B GETs)
Class A Ops Dominate Both (94.7% of R2 Bill): R2 still edges out S3 ($4.50/M vs $5.00/M PUTs), but batching writes into 64MB Parquet/JSONL chunks via queues cuts both bills by >95%.
4. Engineering Methodology: Class A/B Request Accounting & Cache-Hit Offload Math
To prevent artificial vendor lock-in comparisons, this calculator models the complete request and transfer path between origin object storage and the CDN edge:
Origin Cache-Miss Request Filtering: When an asset is fronted by CloudFront or Cloudflare CDN at a cache-hit ratio $h \in [0, 0.99]$, only $(1 – h) \times N_{\text{GET}}$ requests reach the origin bucket as billable Class B `GET`/`HEAD` operations. However, AWS CloudFront still bills $0.0100 per 10,000 HTTPS requests ($1.00 per Million) at the CDN edge (after the 10M/month free tier), whereas standard Cloudflare CDN edge cache hits on R2 custom domains do not incur per-10k edge bandwidth request surcharges.
S3-to-CloudFront Zero Transfer vs. CloudFront-to-Internet Egress: AWS waives data transfer out from an S3 origin to CloudFront, meaning you do not pay S3’s $0.09/GB fee when using CloudFront. Instead, you pay CloudFront’s regional internet egress rate (modeled at the US/EU baseline of $0.085/GB or $85/TB after the 1 TB/month perpetual free tier).
The Tiny-File Class A Write Trap: Both S3 ($5.00/Million `PUT`/`POST`/`LIST`) and Cloudflare R2 ($4.50/Million Class A operations after 1M free) penalize architectures that write millions of tiny 2 KB JSON telemetry payloads directly to object storage. If 1 TB of data is written as 500 million 2 KB objects, the storage costs $15/mo on R2, but the one-time Class A ingestion costs $2,245.50 on R2 ($2,500 on S3). Aggregating events via Cloudflare Queues/Pipelines or Kinesis Firehose into 50 MB Parquet files reduces Class A operations by 25,000x.
Embed This Calculator on Your Engineering Blog or FinOps Wiki (1-Click Iframe Snippet):<iframe src="https://manykeep.com/cloud/cloudflare-r2-vs-aws-s3-cloudfront-calculator/?embed=1" width="100%" height="760" style="border:1px solid #cbd5e1;border-radius:12px;" loading="lazy" title="Cloudflare R2 vs. AWS S3 + CloudFront Cost Calculator"></iframe>