Skip to main content

Bucket limits

By default, there are no limits on buckets, you can store any volume of objects in a bucket as long as there is money in the balance to pay for it.

You can limit the storage of objects in the bucket using limits:

  • on the amount of storage;
  • number of objects;
  • lifetime of objects in the baget.

You can set a storage volume limit on all buckets in a particular pool, see the S3 Limits instructions for details.

Principle of operation

If the limit on storage capacity or number of objects is reached, it will not be possible to load objects into the bucket.

The lifetime limit applies only to new objects - each object's metadata automatically includes a header with the date when the object will be deleted. If Object Lock is enabled in a bucket or for individual objects, the lock takes precedence over the object lifetime limit. Such objects will not be deleted while the lock is in effect.

If you change or delete 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 a title in the metadata will be deleted at the specified time even if the bucket limits are reset.

When the deletion deadline is reached, the objects will become unreadable, but may be displayed in the list for some time. The actual deletion occurs with a delay of up to several days - the time period depends on the number of objects and the buckets region. The storage volume continues to be charged until the final deletion.

Read more about deferred deletion in the Swift API documentation.

Customize buckets limits

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

  2. Go to the Buckets section.

  3. Open the baket page → Configuration tab.

  4. In the Limits block:

    4.1 In the row of the desired limit, click Edit.

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

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

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

    4.5 Click Save.