Skip to main content

Bucket limits

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—a header with the object deletion date is automatically added to each object's metadata. If versioning is enabled in the bucket, the object will not be deleted but moved to the version list; for more details, see the Deleting an object with versioning enabled or suspended section of the Deleting an object guide. If Object Lock is enabled for a bucket or individual objects, the lock takes precedence over the object's lifetime limit. Such objects will not be deleted as long as 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, the objects become inaccessible for reading, but they may still appear in the list for some time. Actual deletion occurs with a delay of up to several days—the time depends on the number of objects and the bucket region. 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.