Skip to main content
Object Storage supports two types of lifecycle rules: expiration lifecycle rules and transition lifecycle rules.

Expiration lifecycle rules

When expiration lifecycle rules apply, Object Storage deletes objects and their versions in a bucket once they expire. For example, you can configure a rule that deletes objects a week after their upload to a bucket. Besides deleting objects, you can also use expiration rules to delete non-current versions of objects and to abort multipart uploads that remain stale for a long time. Expiration rules are the most effective method for these purposes. Use expiration rules when you want to clean up objects and versions that you do not need anymore. This can help you save bucket space, pay less for storage and stay within quotas. If you need to operate with certain objects, you can filter them. For instance, you can only delete objects that have a certain prefix in their name, or that do or do not exceed the specified size limit.

Transition lifecycle rules

When transition lifecycle rules apply, Object Storage changes the storage class of objects. For example, you can automatically downgrade from Enhanced Throughput to the Standard class when you no longer need higher bandwidth and lower latency. As a result, you pay less. The service can switch the storage class a specified number of days after the object upload or after the object has not been accessed. Object Storage considers an object to be accessed if data was retrieved or copied from this object by using S3 methods, such as GetObject, HeadObject, GetObjectTagging, CopyObject and UploadPartCopy. Object Storage considers these methods only if they were sent and executed successfully. If there was an error, such as a permission denied or a connection broken, Object Storage does not detect the object access.

How Object Storage triggers a lifecycle rule

Once you configure a lifecycle rule, Object Storage checks every night (approximately after midnight UTC) whether a condition for expiration or transition is met. If it is, Object Storage triggers a rule. Transition lifecycle rules have several limitations if you configure rules to switch a storage class after an object was not accessed. These limitations are the following:
  • The calculation precision of the last object access is 12 hours. Because of this, the transition to a different storage class may occur not the day the condition is met but the day after that.
  • The service may opt not to consider a too-recent access of an object that was made several hours or minutes ago. For instance, if the object data was retrieved less than an hour ago, but the previous object access was a long time ago, a lifecycle rule can still apply.
  • The service calculates the number of days since the moment you enable a lifecycle rule with the days_since_last_access parameter. Imagine that an object has not been accessed within six months, and you create and enable a rule today with days_since_last_access = 7. In this case, the rule will apply after seven days; the rule will not consider the previous six months.
  • Rarely, Object Storage can switch a storage class even if an object was accessed.

Changes in charging when lifecycle rules apply

The service changes the billing charges in the following way:
  • When an expiration rule is triggered, charging for the used space stops only after objects are deleted. The occupied space on a bucket is recalculated with each object deleted.
  • When a transition rule is triggered, the service starts charging for a new storage class only after the transition is finished. The charging is recalculated with each object that has the storage class switched.

AWS API for management of lifecycle rules

To manage lifecycle rules, do not use the AWS CLI and AWS SDK (for instance, aws s3 and aws s3api commands). Use Nebius AI Cloud interfaces instead: the web console, the Nebius AI Cloud CLI or the provider for Terraform. If you work with transition lifecycle rules that check the last access of an object, you cannot manage them by using the AWS CLI or SDK. These interfaces do not affect lifecycle rules of that type, and you cannot request a list of such rules by using the AWS API.