Lifecycle configurations automate object management by defining actions applied to objects over time, such as expiring objects after a specified period or transitioning them to different storage tiers. This helps optimize storage costs and maintain data hygiene. Learn more about S3-compatible lifecycle bucket configurations.
Example usage
Schema
Required
bucket (String) Name of the bucket to apply lifecycle configuration to
Optional
Nested Schema for rule
Required:
status (String) Rule status: Enabled or Disabled
Optional:
Nested Schema for rule.abort_incomplete_multipart_upload
Optional:
days_after_initiation (Number) Days after initiation to abort multipart uploads
Nested Schema for rule.expiration
Optional:
date (String) ISO8601 date when objects expire
days (Number) Number of days after object creation for expiration
expired_object_delete_marker (Boolean) Whether to remove expired delete markers
Nested Schema for rule.filter
Optional:
and (Block, Optional) Configuration block used to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all the predicates configured inside the and block. (see below for nested schema)
object_size_greater_than (Number) Minimum object size (in bytes) to which the rule applies.
object_size_less_than (Number) Maximum object size (in bytes) to which the rule applies.
prefix (String) Prefix filter
tag (Block, Optional) (see below for nested schema)
Nested Schema for rule.filter.and
Optional:
object_size_greater_than (Number) Minimum object size (in bytes) to which the rule applies.
object_size_less_than (Number) Maximum object size (in bytes) to which the rule applies.
prefix (String) Prefix identifying one or more objects to which the rule applies.
tags (Map of String) Map for specifying tag keys and values.
Nested Schema for rule.filter.tag
Optional:
key (String) Tag key filter
value (String) Tag value filter
Nested Schema for rule.noncurrent_version_expiration
Optional:
newer_noncurrent_versions (Number) Number of noncurrent versions to retain
noncurrent_days (Number) Days after becoming noncurrent before deletion
Nested Schema for rule.noncurrent_version_transition
Required:
noncurrent_days (Number) Number of days after object becomes noncurrent before the transition may occur
storage_class (String) Storage class to transition noncurrent objects to
Optional:
newer_noncurrent_versions (Number) Number of noncurrent versions to retain
Nested Schema for rule.transition
Required:
storage_class (String) Storage class to transition objects to
Optional:
date (String) ISO8601 date when objects transition
days (Number) Number of days after object creation for transition
Import
Import is supported using the following syntax:
Last modified on September 29, 2026