Skip to main content

Bucket limits

Last update:

By default, no limits are set on buckets; you can store any volume of objects in a bucket as long as you have funds on your balance to pay for them.

You can limit object storage in a bucket using the following limits:

  • storage volume;
  • number of objects;
  • object lifetime in the bucket.

You can set a storage volume limit for all buckets in a specific pool, learn more in the S3 Limits guide.

How it works

When the storage volume or object count limit is reached, it will be impossible to upload objects to the bucket.

The lifetime limit applies only to new objects — each object's metadata is automatically assigned a header with the date the object will be deleted. If versioning is enabled in the bucket, the object will not be deleted but moved to the version list; see more in the Deleting an object with versioning enabled or suspended subsection of the Delete object guide. If Object Lock is enabled for the bucket or individual objects, the lock takes precedence over the object lifetime limit. Such objects will not be deleted while the lock is in effect.

When changing or removing a limit, the header for previously uploaded objects will not change:

  • objects that were uploaded before the limit was set will not be deleted;
  • objects with the header in metadata will be deleted at the specified time even if bucket limits are reset.

When the deletion date is reached, objects become unavailable for reading, but they may still appear in the list for some time. The actual deletion occurs with a delay of up to several days—the time depends on the number of objects and the bucket region. The storage volume continues to be charged until the final deletion.

Read more about delayed deletion in the Swift API documentation.

Configure bucket limits

  1. In the control panel, on the top menu click Products and select S3.

  2. Go to the Buckets section.

  3. Open the bucket page → Configuration tab.

  4. In the Limits block:

    4.1. In the limit row, click Edit.

    4.2. If you selected a storage volume limit, turn on the Limit toggle and enter the maximum storage volume in GB.

    4.3. If you selected an object count limit, turn on the Limit toggle and enter the maximum number of objects that can be stored in the bucket.

    4.4. If you selected a lifetime limit, turn on the Auto-delete toggle and enter the number of hours after which objects will be deleted.

    4.5. Click Save.