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 limit on all buckets in a specific pool; for details, see the S3 Limits instructions.
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 date when the object will be deleted is automatically added to the metadata of each object. If versioning is enabled in the bucket, the object will not be deleted, but will be moved to the version list; for more information, see the Delete an object with versioning enabled or suspended subsection of the Delete an object instructions. If Object Lock is enabled in the bucket or for individual objects, the lock takes precedence over the object's lifetime limit. Such objects will not be deleted while the lock is active.
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.
Upon reaching the deletion date, objects become inaccessible for reading, but may still appear in the list for some time. Actual deletion occurs with a delay of up to several days, depending on the number of objects and the bucket region. Storage volume continues to be charged until final deletion.
Learn more about delayed deletion in the Swift API documentation.
Configure bucket limits
-
In the Control panel, in the top menu, click Products and select S3.
-
Go to the Buckets section.
-
Open the bucket page → Configuration tab.
-
In the Limits block:
4.1. In the limit row, click Edit.
4.2. If you selected a storage limit, turn on the Limit toggle switch and enter the maximum storage amount in GB.
4.3. If you selected an object count limit, turn on the Limit toggle switch 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 switch and enter the number of hours after which objects will be deleted.
4.5. Click Save.