Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Object Storage
  • Pricing policy
  • Terraform reference
    • API authentication
      • How to use the API
      • Signing requests
      • Getting started with the S3 API
        • All services and methods
          • All methods
          • XML structure of lifecycle configuration
          • PutBucketLifecycleConfiguration
          • GetBucketLifecycleConfiguration
          • DeleteBucketLifecycle
        • Common request headers
        • Common response headers
        • Responses
  • Monitoring metrics
  • Audit Trails events
  • Bucket logs
  • Release notes
  • FAQ

In this article:

  • Elements
  • Example
  1. API reference
  2. AWS S3 REST
  3. REST
  4. Lifecycles
  5. XML structure of lifecycle configuration

Bucket object lifecycle configuration

Written by
Yandex Cloud
Updated at August 6, 2026
View in Markdown
  • Elements
  • Example

Object Storage allows you to manage bucket object lifecycles. To upload a lifecycle configuration to Object Storage, you need to create an XML document as described in this section. You can get a document in this format by downloading an existing configuration.

The general configuration format is as follows:

<LifecycleConfiguration>
    <Rule>
        <ID>Rule description</ID>
        <Status>{Enabled|Disabled}</Status>
        <Filter>
            <And>
                <ObjectSizeGreaterThan>minimum object size</ObjectSizeGreaterThan>
                <ObjectSizeLessThan>maximum object size</ObjectSizeLessThan>
                <Prefix>key prefix</Prefix>
                <Tag>
                    <Key>label key</Key>
                    <Value>label value</Value>
                </Tag>
                ...
            </And>
            <ObjectSizeGreaterThan>minimum object size</ObjectSizeGreaterThan>
            <ObjectSizeLessThan>maximum object size</ObjectSizeLessThan>
            <Prefix>key prefix</Prefix>
            <Tag>
                <Key>label key</Key>
                <Value>label value</Value>
            </Tag>
        </Filter>

        <Transition>
            <StorageClass>Storage class ID</StorageClass>
            <!-- <Date> or <Days> -->
        </Transition>

        <Expiration>
            <!-- <Date> or <Days> -->
            <!-- <ExpiredObjectDeleteMarker> -->
        </Expiration>

        <NoncurrentVersionTransition>
            <StorageClass>Storage class ID</StorageClass>
            <NoncurrentDays>Migrating versions that are older than the specified number of days</NoncurrentDays>
        </NoncurrentVersionTransition>

        <NoncurrentVersionExpiration>
            <NoncurrentDays>Deleting versions that are older than the specified number of days</NoncurrentDays>
            <NewerNoncurrentVersions>Number of recent non-current versions that are stored indefinitely</NewerNoncurrentVersions>
        </NoncurrentVersionExpiration>

        <AbortIncompleteMultipartUpload>
            <DaysAfterInitiation>Deleting uploads that were not completed within the specified number of days</DaysAfterInitiation>
        </AbortIncompleteMultipartUpload>
        ...
    </Rule>
    <Rule>
      ...
    </Rule>
    ...
</LifecycleConfiguration>

A configuration may contain up to 1,000 rules.

ElementsElements

Element

Description

LifecycleConfiguration

Root element of an XML document.
It can contain up to 1,000 Rule elements.
Path: LifecycleConfiguration.

Rule

Rule description.
The Filter element specifies objects that meet the rule. The Transition and Expiration elements define actions on objects. There can be multiple actions of each type.
Path: LifecycleConfiguration\Rule.

ID

Unique rule ID.
Any text up to 255 characters long, e.g., Delete in 20 days. It is an optional parameter that you can use to search for a rule in a configuration.
If the ID is not specified, Object Storage generates it automatically.
Path: LifecycleConfiguration\Rule\ID.

Status

Rule status.
You can activate a rule by setting <Status>Enabled</Status> or deactivate it by setting <Status>Disabled</Status>.
Path: LifecycleConfiguration\Rule\Status.

Filter

Object filter.
It may only contain one element of each type: And, Prefix, ObjectSizeGreaterThan, ObjectSizeLessThan, or Tag.
If an empty <Filter></Filter> filter is set, the rule applies to all objects in a bucket.
Path: LifecycleConfiguration\Rule\Filter.

ObjectSizeGreaterThan

Minimum object size in bytes.
The rule applies to objects with a size greater than the specified value.
The filter may contain only one minimum object size.
Path: LifecycleConfiguration\Rule\Filter\ObjectSizeGreaterThan.

ObjectSizeLessThan

Maximum object size in bytes.
The rule applies to objects with a size less than the specified value.
The filter may contain only one maximum object size.
Path: LifecycleConfiguration\Rule\Filter\ObjectSizeLessThan.

Prefix

Key prefix.
The rule applies to objects with the specified key prefix.
For example, the some/long/object/key key may have these prefixes: some, some/, or some/lo.
The filter may contain only one prefix.
Path: LifecycleConfiguration\Rule\Filter\Prefix.

Tag

Object label.
The rule applies to objects with the specified label assigned.
The filter may contain only one object label.
Path: LifecycleConfiguration\Rule\Filter\Tag.

And

Logical AND for filters.
This filter may contain any combination of the following elements: Prefix, ObjectSizeGreaterThan, ObjectSizeLessThan, and Tag.
Path: LifecycleConfiguration\Rule\Filter\And.

Key

Object label key.
Path: LifecycleConfiguration\Rule\Filter\Tag\Key.

Value

Object label value.
Path: LifecycleConfiguration\Rule\Filter\Tag\Value.

Transition

Rule for changing the storage class of an object.
It contains the StorageClass element, which defines the target storage class and the Date or Days element, which sets when the action expires.
You can only move objects from the STANDARD storage to the COLD, ICE, or INTELLIGENT_TIERING one, and from the cold storage, to the ice one.
For buckets with versioning enabled, the action will apply to the current object versions.
Path: LifecycleConfiguration\Rule\Transition\.

StorageClass

Storage class of the object It can be COLD, STANDARD, ICE, or INTELLIGENT_TIERING.
Path: LifecycleConfiguration\Rule\Transition\StorageClass.

Expiration

Rule for deleting an object from Object Storage.
Contains the Days or Date element that sets the action expiry.
It may also contain ExpiredObjectDeleteMarker: an expired object delete marker that indicates whether Object Storage will remove the delete marker if there are not any non-current versions.
For buckets with versioning enabled, the action will apply to current versions of objects.
Path: LifecycleConfiguration\Rule\Expiration.

Date

Date for the rule to apply.
The date should be in ISO 8601 format, e.g., YYYY-MM-DD. The time is always 00:00 UTC.
Path: LifecycleConfiguration\Rule\Expiration\Date.

Days

Time interval for the rule to apply.
It is defined by the number of days since the object was uploaded.
The minimum value is 1.
Path: LifecycleConfiguration\Rule\Expiration\Days.

NoncurrentVersionTransition

Rule for changing the storage class of non-current object versions. This rule only applies to non-current versions of an object rather than the entire object.
You can only move objects from the STANDARD storage to the COLD, ICE, or INTELLIGENT_TIERING one, and from the cold storage, to the ice one.
Path: LifecycleConfiguration\Rule\NoncurrentVersionTransition.

StorageClass

Storage class to move the object to. It can be COLD, STANDARD, ICE, or INTELLIGENT_TIERING.
Path: LifecycleConfiguration\Rule\NoncurrentVersionTransition\StorageClass.

NoncurrentDays

Number of days after which a non-current version is moved to a different storage class. The minimum value is 1.
Path: LifecycleConfiguration\Rule\NoncurrentVersionTransition\NoncurrentDays.

NewerNoncurrentVersions

Number of recent non-current object versions retained indefinitely. Versions beyond this number are migrated to another storage class after the period specified in NoncurrentDays.
Path: LifecycleConfiguration\Rule\NoncurrentVersionTransition\NewerNoncurrentVersions.

NoncurrentVersionExpiration

Rule for deleting non-current object versions from Object Storage. This rule only applies to non-current versions of an object rather than the entire object.
Path: LifecycleConfiguration\Rule\NoncurrentVersionExpiration.

Tip

To remove non-current delete markers, use the NoncurrentDeleteMarkers lifecycle rule parameter. Only the Yandex Cloud CLI, Yandex Cloud REST, and Yandex Cloud gRPC support this parameter.

NoncurrentDays

Number of days after which a non-current version will be deleted. The minimum value is 1.
Path: LifecycleConfiguration\Rule\NoncurrentVersionExpiration\NoncurrentDays.

NewerNoncurrentVersions

Number of recent non-current object versions retained indefinitely. Versions beyond this number get deleted after the period specified in NoncurrentDays.
Path: LifecycleConfiguration\Rule\NoncurrentVersionExpiration\NewerNoncurrentVersions.

AbortIncompleteMultipartUpload

Rule for deleting uploads that were not completed within the specified number of days.
It contains the DaysAfterInitiation element, which sets when the rule is to be applied.
Path: LifecycleConfiguration\Rule\AbortIncompleteMultipartUpload\DaysAfterInitiation.

ExampleExample

The rule below applies to all objects uploaded to the bucket as follows:

  • They are moved to the cold storage 30 days after being uploaded to Object Storage.
  • They are deleted from Object Storage 365 days after being uploaded.
  • Incomplete uploads are deleted from Object Storage five days after the start of the object upload.
<LifecycleConfiguration>
    <Rule>
        <ID>Move and then delete</ID>
        <Status>Enabled</Status>
        <Filter>
           <Prefix></Prefix>
        </Filter>
        <Transition>
            <StorageClass>COLD</StorageClass>
            <Days>30</Days>
        </Transition>
        <Expiration>
            <Days>365</Days>
        </Expiration>
        <AbortIncompleteMultipartUpload>
            <DaysAfterInitiation>5</DaysAfterInitiation>
        </AbortIncompleteMultipartUpload>
    </Rule>
</LifecycleConfiguration>

Related articlesRelated articles

  • Bucket object lifecycles

Useful linksUseful links

  • Getting started with the AWS S3 API in Yandex Object Storage

  • Debugging requests using the AWS CLI

  • Example of sending a signed request using curl

  • Code example for generating a signature

The non-current object version that has been deleted gets marked by a non-current delete marker (NoncurrentDeleteMarker). This happens when a new object version is loaded on top of a deleted one. In which case the object becomes available again, and the marker which used to mark the deleted version moves to the version history.

Was the article helpful?

Previous
All methods
Next
PutBucketLifecycleConfiguration
© 2026 Direct Cursus Technology L.L.C.