Back to articles
Cloudflare R2 Has a Free Tier — S3-Compatible Object Storage With Zero Egress Fees

Cloudflare R2 Has a Free Tier — S3-Compatible Object Storage With Zero Egress Fees

via Dev.to WebdevAlex Spinov

AWS S3 charges you to store data AND to retrieve it. The egress fees are the nasty surprise — serving 1TB of images costs $90/month just in bandwidth. Cloudflare R2 gives you S3-compatible storage with zero egress fees . The free tier includes 10GB storage and 10 million reads/month. Zero. Egress. Fees. What You Get for Free 10 GB storage — enough for thousands of files 1 million writes/month — PUT, POST, DELETE 10 million reads/month — GET requests Zero egress fees — serve files globally, pay nothing for bandwidth S3-compatible API — use any S3 SDK or tool Custom domains — serve from your own domain Workers integration — process files at the edge Quick Start 1. Create a Bucket In Cloudflare Dashboard > R2 > Create bucket. Get your Account ID and generate an API token with R2 permissions. 2. Node.js (AWS SDK) npm install @aws-sdk/client-s3 import { S3Client , PutObjectCommand , GetObjectCommand } from " @aws-sdk/client-s3 " ; const r2 = new S3Client ({ region : " auto " , endpoint : "

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
1 views

Related Articles