Object storage keeps files (“objects”) in flat containers called buckets and serves them over HTTP. Among the big three, Cloudflare R2 is usually cheapest when people download a lot, because it charges nothing for data leaving it; Amazon S3 has the most features and storage classes; and Azure Blob Storage fits best if you already use Microsoft Azure. For cold backups and archives, S3 and Azure’s archive tiers cost a fraction of R2’s price.

Object storage sits behind a large part of the internet: website images and downloads, video, app uploads, backups, logs, and the raw files of data lakes. This guide explains how it works, then compares the three services side by side on price, egress fees, storage tiers, features, and tools, with cost examples and code to get started.

Prices below are list prices in US regions as of late 2026, rounded. Cloud prices change and vary by region, so check each provider’s pricing page or calculator before you budget.

What Is Object Storage?

Object storage saves each file as an object made of three parts:

  • The data: the file itself, from a few bytes to many terabytes.
  • A key: its unique name, such as invoices/2026/inv-1042.pdf.
  • Metadata: information about the file, such as its content type, size, and custom tags.

Objects live in buckets (Azure calls them containers). There are no real folders: the / in a key just makes it look like a path, and tools display it as folders for convenience. You upload and download objects through an HTTP API instead of a file system, which means any program, server, or browser with the right permissions can reach them from anywhere.

Object vs. Block vs. File Storage

Object storageBlock storageFile storage
UnitWhole objects with metadataFixed-size blocksFiles in folders
AccessHTTP API (S3, Azure Blob)Attached as a disk to one serverNetwork share (NFS, SMB)
ScalePractically unlimitedLimited by the volume sizeLimited by the file server
EditingReplace the whole objectChange any blockChange part of a file
Best forMedia, backups, static files, data lakesDatabases and operating systemsShared office files, legacy apps
ExamplesS3, R2, Azure BlobAWS EBS, Azure Managed DisksAWS EFS, Azure Files

The trade-off: object storage is cheap, durable, and scales without limits, but you can’t edit part of an object in place or run a database on it. It suits files you write once and read many times.

  • Durability. All three providers design their storage for 99.999999999% (“eleven nines”) durability by keeping several copies across separate hardware.
  • Pay for what you use. No disks to size or buy ahead of time.
  • Direct web access. Objects can be served straight to browsers, often through a CDN.
  • A common API. The Amazon S3 API has become the standard; Cloudflare R2, Backblaze B2, DigitalOcean Spaces, MinIO, and many others speak it too.

The Three Services at a Glance

Cloudflare R2Amazon S3Azure Blob Storage
Launched202220062010
APIS3-compatibleS3 (the original)Azure Blob API (not S3)
Storage (standard/hot, per GB-month)$0.015$0.023about $0.018–$0.021
Egress to the internetFree~$0.09/GB after 100 GB/month free~$0.087/GB after 100 GB/month free
Writes (per million)$4.50$5.00about $5.00
Reads (per million)$0.36$0.40about $0.40
Cheaper tiersInfrequent AccessMany, down to Glacier Deep ArchiveCool, Cold, Archive
Lowest storage price$0.01/GB~$0.001/GB~$0.001/GB
Region choiceAutomatic, with location hints and jurisdictions (such as the EU)Dozens of regionsDozens of regions
Free tier10 GB storage, 1M writes, 10M reads every monthCredits for new accountsLimited free amount for new accounts
Best forPublic files, media, downloads, anything read a lotFeature-rich AWS workloads, data lakesMicrosoft and Azure environments

Cloudflare R2

Cloudflare launched R2 in 2022 with one headline feature: no egress fees. You pay for storage and operations, but not for the data people download, which is often the biggest line on an S3 bill.

Pricing: Standard storage is $0.015 per GB-month. Operations are split into Class A (writes and lists, $4.50 per million) and Class B (reads, $0.36 per million), and deletes are free. Every account gets 10 GB of storage, 1 million Class A, and 10 million Class B operations free each month. An Infrequent Access class costs $0.01 per GB-month but adds a $0.01/GB retrieval fee, higher operation prices, and a 30-day minimum.

Strengths:

  • Free egress makes costs predictable for public files, images, video, and downloads.
  • S3-compatible API, so most S3 tools and SDKs work by changing the endpoint.
  • Built into Cloudflare’s network: serve a bucket on your own domain with Cloudflare’s CDN caching, and process files with Cloudflare Workers.
  • Migration tools that copy data from S3 and other providers, either all at once or gradually as objects are requested.

Limitations:

  • No archive tiers, so long-term cold data costs more than on S3 or Azure.
  • Fewer features than S3, and not every S3 API feature is supported; check Cloudflare’s S3 compatibility list for anything you rely on.
  • You don’t pick an exact region; R2 places data automatically, with location hints and jurisdiction options for data residency.

If you’re new to Cloudflare, see What Is Cloudflare? Website Security and Performance Guide.

Amazon S3

Amazon S3 (Simple Storage Service) launched in 2006 and defined the category. Its API is the standard others copy, and it has the deepest set of features and integrations.

Pricing: S3 Standard costs about $0.023 per GB-month in US East for the first 50 TB, with small discounts above that. Writes (PUT, COPY, POST, LIST) cost about $0.005 per 1,000 ($5 per million) and reads (GET) about $0.0004 per 1,000 ($0.40 per million). Data out to the internet costs about $0.09 per GB after the first 100 GB each month (that allowance is shared across AWS), dropping at high volumes. Uploads are free, and transfer from S3 to the CloudFront CDN is free.

Storage classes: S3 has the widest choice, from fast to very cheap:

ClassUse it for
S3 StandardFrequently used data
S3 Intelligent-TieringUnknown or changing access patterns; S3 moves objects between tiers for you
S3 Standard-IA / One Zone-IAData read less than once a month
S3 Glacier Instant RetrievalArchives you still need within milliseconds
S3 Glacier Flexible RetrievalArchives you can wait minutes to hours for
S3 Glacier Deep ArchiveLong-term archives at about $0.001 per GB-month, with retrieval in hours
S3 Express One ZoneVery low latency for high-performance workloads

Strengths:

  • The most features: versioning, Object Lock (write-once-read-many for compliance and ransomware protection), lifecycle rules, replication across regions, event notifications, detailed access policies, and analytics.
  • Integrates with nearly every AWS service and countless third-party tools.
  • Querying files in place with Athena and other analytics services makes it a common foundation for data lakes.

Limitations:

  • Egress fees can dominate the bill for public or heavily downloaded content.
  • The number of options (storage classes, request types, transfer prices, policies) makes costs harder to predict.

Azure Blob Storage

Azure Blob Storage is Microsoft’s object storage, part of an Azure storage account that can also hold file shares, queues, and tables.

Pricing: Hot tier storage costs roughly $0.018–$0.021 per GB-month in US regions with locally redundant storage (LRS), depending on the region and current rates. Writes cost about $0.05 per 10,000 ($5 per million) and reads about $0.004 per 10,000 ($0.40 per million) on the Hot tier. Internet egress is about $0.087 per GB after the first 100 GB each month.

Access tiers:

TierApproximate storage priceMinimum storage timeUse it for
Hot$0.018–$0.021/GBNoneData used often
Cool~$0.01–$0.015/GB30 daysData used about monthly
Cold~$0.004/GB90 daysData used rarely but needed quickly
Archive~$0.001/GB180 daysLong-term archives; hours to rehydrate

Cheaper tiers charge more for each operation and add a per-GB retrieval fee, so match the tier to how often you really read the data.

Redundancy options: You choose how many copies to keep and where: LRS (three copies in one datacenter), ZRS (across availability zones), GRS (also copied to a second region), and GZRS (both). More redundancy costs more.

Strengths:

  • Tight integration with Microsoft Entra ID (sign-in and permissions), Azure services, Microsoft 365 workflows, and tools like Power BI and Azure Data Factory.
  • Azure Data Lake Storage adds a real folder hierarchy on top of Blob Storage for analytics.
  • Immutable storage, versioning, soft delete, and lifecycle policies.
  • Often the natural choice for organizations with Microsoft agreements and credits.

Limitations:

  • Its own API, not S3. Tools written for S3 need an Azure SDK or a compatibility layer.
  • Egress fees similar to S3.

If your organization runs Microsoft’s identity services, see What Is Active Directory? for how Entra ID fits in.

Cost Examples

Rough monthly costs for two common situations, using the list prices above (US regions, 1 TB = 1,000 GB, before taxes and discounts).

Example 1: A Website’s Images and Downloads

1 TB stored, 1 million uploads, 10 million downloads, and 5 TB of data transferred to visitors each month.

Cloudflare R2Amazon S3 StandardAzure Blob Hot (LRS)
Storage~$15$23~$18–$21
Writes (1M)$0 (free tier)$5~$5
Reads (10M)$0 (free tier)$4~$4
Egress (5 TB)$0~$441~$426
Total~$15~$473~$455

Egress is almost the entire bill on S3 and Azure. Putting a CDN in front (CloudFront for S3, Azure Front Door or a CDN for Azure) lowers it, since most requests are served from the cache, but the CDN has its own transfer prices. This is the case R2 was built for.

Example 2: Backups Nobody Downloads

1 TB of backups kept for years, rarely read.

OptionApproximate monthly storage cost
Cloudflare R2 Standard~$15
Cloudflare R2 Infrequent Access~$10
Amazon S3 Glacier Deep Archive~$1
Azure Blob Cold~$4
Azure Blob Archive~$1

Here the archive tiers win by a wide margin. The catch is restoring: archive retrieval takes hours and has its own per-GB and per-request fees, and deleting data before the minimum storage period still bills the full period. For backup strategy, see What Is the 3-2-1 Backup Rule?

Using Object Storage: Code Examples

S3 and R2 with the AWS CLI

Because R2 speaks the S3 API, the AWS command-line tool works with both. For Amazon S3:

aws s3 cp backup.tar.gz s3://my-bucket/backups/
aws s3 ls s3://my-bucket/backups/
aws s3 sync ./public s3://my-bucket/site/

For R2, create an API token in the Cloudflare dashboard (under R2), save its keys in an AWS CLI profile, and add the R2 endpoint:

aws configure --profile r2       # enter the R2 access key, secret key, and region "auto"

aws s3 cp backup.tar.gz s3://my-bucket/backups/ \
    --profile r2 \
    --endpoint-url https://<ACCOUNT_ID>.r2.cloudflarestorage.com

S3 and R2 with Python (boto3)

The same Python code works with both services; only the client settings change. Install the SDK with pip install boto3, and keep keys in environment variables instead of in the code:

import os
import boto3

# Cloudflare R2: set R2_ENDPOINT to https://<ACCOUNT_ID>.r2.cloudflarestorage.com
# Amazon S3: leave R2_ENDPOINT unset; boto3 uses AWS automatically
s3 = boto3.client(
    "s3",
    endpoint_url=os.environ.get("R2_ENDPOINT"),
    aws_access_key_id=os.environ["ACCESS_KEY_ID"],
    aws_secret_access_key=os.environ["SECRET_ACCESS_KEY"],
    region_name=os.environ.get("REGION", "auto"),
)

bucket = "my-bucket"

# Upload a file
s3.upload_file("report.pdf", bucket, "reports/2026/report.pdf")

# List files under a prefix
response = s3.list_objects_v2(Bucket=bucket, Prefix="reports/")
for obj in response.get("Contents", []):
    print(obj["Key"], obj["Size"])

# Download a file
s3.download_file(bucket, "reports/2026/report.pdf", "report-copy.pdf")

# Share a private file for one hour with a pre-signed URL
url = s3.generate_presigned_url(
    "get_object",
    Params={"Bucket": bucket, "Key": "reports/2026/report.pdf"},
    ExpiresIn=3600,
)
print(url)

For Amazon S3, set REGION to your bucket’s region (for example us-east-1).

A pre-signed URL lets someone download (or upload) one private object for a limited time without having your keys, which is the usual way to share private files from a web app.

Azure Blob Storage with the Azure CLI and Python

az login
az storage blob upload \
    --account-name mystorageacct \
    --container-name backups \
    --name backup.tar.gz \
    --file backup.tar.gz \
    --auth-mode login

In Python, install pip install azure-storage-blob azure-identity:

from azure.identity import DefaultAzureCredential
from azure.storage.blob import BlobServiceClient

service = BlobServiceClient(
    "https://mystorageacct.blob.core.windows.net",
    credential=DefaultAzureCredential(),
)
container = service.get_container_client("reports")

# Upload a file
with open("report.pdf", "rb") as f:
    container.upload_blob("2026/report.pdf", f, overwrite=True)

# List files under a prefix
for blob in container.list_blobs(name_starts_with="2026/"):
    print(blob.name, blob.size)

DefaultAzureCredential signs in with whatever is available (your az login session on a laptop, a managed identity on an Azure server), so no keys are stored in code. Azure’s equivalent of a pre-signed URL is a shared access signature (SAS).

Security Basics for Any Bucket

Misconfigured buckets are one of the most common causes of data leaks. Whichever service you use:

  • Keep buckets private by default. Make public only what’s meant for the public, ideally through a CDN or custom domain.
  • Use narrowly scoped keys. Give each app its own key with access to only the buckets and actions it needs, and rotate keys regularly.
  • Use pre-signed URLs or SAS tokens for temporary access to private files.
  • Turn on versioning or immutability for important data (S3 Object Lock, Azure immutable storage, R2 bucket locks where available), so ransomware or a bad script can’t destroy your only copy.
  • Encrypt sensitive data. All three encrypt data at rest by default; add client-side encryption for highly sensitive files.
  • Set lifecycle rules to delete or archive old data automatically, which controls cost and limits what can leak.

How to Choose

  • Choose Cloudflare R2 if you serve files to the public (images, video, downloads, static assets), want predictable costs, or already use Cloudflare.
  • Choose Amazon S3 if you run on AWS, need the richest feature set (Object Lock, many storage classes, analytics integrations), or are building a data lake on AWS.
  • Choose Azure Blob Storage if your organization runs on Microsoft and Azure, uses Entra ID, or needs Azure’s analytics and compliance tooling.
  • For archives and backups, use S3 Glacier Deep Archive or Azure Archive for the lowest storage price, or R2 if you need fast, free restores.

Many teams combine them, for example keeping primary data in S3 or Azure and putting public assets in R2, or sending a second backup copy to a different provider. Because R2 and many others use the S3 API, moving between S3-compatible services is mostly a matter of changing endpoints and keys. For how storage fits into cloud services in general, see What Is Cloud Computing? SaaS, PaaS, and IaaS Explained.

Conclusion

Object storage is the simplest way to store large amounts of files cheaply and reach them from anywhere. The three leaders differ mainly in how they charge: R2 removes egress fees, which makes it the bargain for content people download; S3 offers the most features and the cheapest deep archive; and Azure Blob is the natural fit inside the Microsoft ecosystem. Estimate your own storage, operations, and especially egress before you choose, because the cheapest service per gigabyte isn’t always the cheapest bill.

Frequently Asked Questions

What is object storage used for?

Website images and downloads, video, user uploads in web and mobile apps, backups, logs, and the raw files in data lakes. It suits files that are written once and read many times.

Is Cloudflare R2 really free of egress fees?

Yes, Cloudflare doesn’t charge for data transferred out of R2. You still pay for storage and for operations, including Class B (read) requests beyond the free allowance.

Can I use S3 tools with Cloudflare R2?

Mostly. R2 implements the S3 API, so the AWS CLI, boto3, rclone, and most S3 libraries work when you point them at the R2 endpoint. A few advanced S3 features aren’t supported, so check Cloudflare’s compatibility list.

Is Azure Blob Storage compatible with the S3 API?

Not natively. Use the Azure SDKs, the Azure CLI, or tools that support Azure directly, such as rclone.

What is egress, and why does it matter?

Egress is data leaving the provider’s network, for example when visitors download your files. S3 and Azure charge for it per GB, and for popular content it can cost far more than the storage itself.

Which is cheapest for backups?

For data you rarely restore, S3 Glacier Deep Archive and Azure Archive cost about $1 per TB per month. Restores take hours and have extra fees, so for backups you restore often, R2’s free egress can work out cheaper.

Want to keep learning? These related guides pair well with this post: