| [ Web Proxy ] |
| Viewing: https://www.cloudflare.com/developer-platform/products/r2/ | [Back] [Original] |
Near-infinite scale
Access data from anywhere, create millions of buckets, and write as much data as you need to run your business.
Sleep better
Don't wake up to a huge egress bill overnight: R2 doesn't charge for egress.
S3-compatible APIs
R2 exposes S3 compatible APIs: use your existing tools without a rewrite.
Progressive migration
R2 can sit in front of your legacy object storage provider and progressively copy objects as they are requested, taking the complexity out of managing data migration.
R2 Data Catalog
Use R2's Iceberg-compatible data catalog with your favorite SQL data warehouse to query logs and structured data formats you store in R2.
Part of Cloudflare Workers
Access your R2 buckets directly from your Workers code without having to juggle API keys and SDKs with a native Workers API.
[Background Pattern] R2 R2 is globally distributed object storage designed for modern applications. Durable, S3-compatible, and tightly integrated with Workers for building data-driven systems without extra infrastructure.
See moreStore application data without egregious egress fees
Download your data from R2 without worrying that your egress bill is scaling 1:1 with your growth. Store and access user content, AI training data, logs and columnar data without breaking the bank.Store AI datasets and model artifacts
Keep training data, model weights, and analytics datasets accessible from any cloud provider without transfer fees. Data portability enables better infrastructure choices.Break free from cloud vendor lock-in
Store your data neutrally and access it from any cloud provider for compute workloads. Choose the best tools without being trapped by transfer costs.Migration without the risk
Configure R2 to pull objects from your existing object storage provider as they are requested, allowing you to switch to R2 without having to manage large-scale data migration and benefit from zero-egress fees immediately.Switch your endpoints to R2 and keep using your current tools, SDKs, and pipelines. R2's S3-compatible API makes migration frictionless.
[Background Pattern] import boto3
s3 = boto3.resource('s3', endpoint_url = 'https://{your-account-id}.r2.cloudflarestorage.com', aws_access_key_id = '{access_key_id}', aws_secret_access_key = '{access_key_secret}')export default { async fetch(request, env) { let key = new URL(request.url).searchParams.get('key'); // Write an object to R2 directly await env.MY_BUCKET.put(key, request.body);
// Fetch an object (or objects!) using the Workers API: const object = await env.MY_BUCKET.get(key); return new Response(object); },};-- Install the iceberg DuckDB extension and load the extension.INSTALL iceberg;LOAD iceberg;
-- Create a DuckDB secret to store R2 Data Catalog credentials.CREATE SECRET r2_secret ( TYPE ICEBERG, TOKEN '<token>');
-- Attach your R2 Data CatalogATTACH '<warehouse_name>' AS prod_analytics_data ( TYPE ICEBERG, ENDPOINT '<catalog_uri>');
-- Show all available tables.SHOW ALL TABLES;
-- Query your Iceberg table.SELECT * FROM prod_analytics_data.default.user_events;S3-compatible
R2's S3 compatible API means that you can easily migrate to R2 without having to rewrite your code or change the tools your team is using.Build applications using Workers and R2
Straightforward APIs that allow you directly access R2 from Cloudflare Workers.Query Data in R2
Use R2's native Iceberg-compatible Data Catalog to manage schemas and query structured data stored in R2 with your favorite query engine or ETL tool, including DuckDB, Spark, Trino or Snowflake.Character.AI
Object storage without egress fees. View Storage & Data pricing details
Standard Storage
10 GB-month
$0.015 / GB-month
Standard Class A operations
1 million
$4.50 / million requests
Standard Class B operations
10 million
$0.36 / million requests
Infrequent Access Storage
$0.01 / GB-month
Infrequent Access Class A operations
$9.00 / million requests
Infrequent Access Class B operations
$0.90 / million requests
Infrequent Access Data Retrieval
$0.01 / GB
Join thousands of developers who've eliminated infrastructure complexity and deployed globally with Cloudflare. Start building for free no credit card required.
| Web Proxy Viewer | New URL | Original Page |