Skip to content
Cloudflare Docs

Storage classes

Storage classes allow you to trade off between the cost of storage and the cost of accessing data. Every object stored in R2 has an associated storage class.

All storage classes share the following characteristics:

  • Compatible with Workers API, S3 API, and public buckets.
  • 99.999999999% (eleven 9s) of annual durability.
  • No minimum object size.

Available storage classes

Storage classMinimum storage durationData retrieval fees (processing)Egress fees (data transfer to Internet)
StandardNoneNoneNone
Infrequent Access30 daysYesNone

For more information on how storage classes impact pricing, refer to Pricing.

Standard storage

Standard storage is designed for data that is accessed frequently. This is the default storage class for new R2 buckets unless otherwise specified.

Example use cases

  • Website and application data
  • Media content (e.g., images, video)
  • Storing large datasets for analysis and processing
  • AI training data
  • Other workloads involving frequently accessed data

Infrequent Access storage Beta

Infrequent Access storage is ideal for data that is accessed less frequently. This storage class offers lower storage cost compared to Standard storage, but includes retrieval fees and a 30 day minimum storage duration requirement.

Example use cases

  • Long-term data archiving (for example, logs and historical records needed for compliance)
  • Data backup and disaster recovery
  • Long tail user-generated content

Set default storage class for buckets

By setting the default storage class for a bucket, all objects uploaded into the bucket will automatically be assigned the selected storage class unless otherwise specified. Default storage class can be changed after bucket creation in the Dashboard.

To learn more about creating R2 buckets, refer to Create new buckets.

Set storage class for objects

Specify storage class during object upload

To learn more about how to specify the storage class for new objects, refer to the Workers API and S3 API documentation.

Use object lifecycle rules to transition objects to Infrequent Access storage

To learn more about how to transition objects from Standard storage to Infrequent Access storage, refer to Object lifecycles.

Change storage class for objects

You can change the storage class of an object which is already stored in R2 using the CopyObject API.

Use the x-amz-storage-class header to change between STANDARD and STANDARD_IA.

An example of switching an object from STANDARD to STANDARD_IA using aws cli is shown below:

Terminal window
aws s3api copy-object \
--endpoint-url https://<ACCONUT_ID>.r2.cloudflarestorage.com \
--bucket bucket-name \
--key path/to/object.txt \
--copy-source /bucket-name/path/to/object.txt \
--storage-class STANDARD_IA
  • Refer to aws CLI for more information on using aws CLI.
  • Refer to object-level operations for the full list of object-level API operations with R2-compatible S3 API.