lifecycle_rule variable.
Basic transition and expiration
The following rule transitions objects tagged withsome=value through progressively cheaper storage and expires them after 90 days:
Noncurrent version management
For versioned buckets you can separately control what happens to older versions:Filter options
Filters control which objects a rule applies to. Iffilter is omitted the rule applies to all objects.
- Prefix filter
- Tag filter
Abort incomplete multipart uploads
Incomplete multipart uploads accrue storage charges indefinitely. Setabort_incomplete_multipart_upload_days to clean them up automatically:
Delete markers
When all versions of an object are expired, S3 leaves behind a delete marker. Remove it automatically:Transition default minimum object size
By default S3 transitions only objects that are at least 128 KB (all_storage_classes_128K). You can change this behaviour with transition_default_minimum_object_size:
| Value | Description |
|---|---|
all_storage_classes_128K | Objects smaller than 128 KB are never transitioned (default) |
varies_by_storage_class | Each storage class applies its own minimum size threshold |
Storage class reference
| Storage class | Minimum storage duration | Typical use |
|---|---|---|
STANDARD_IA | 30 days | Infrequently accessed, rapid retrieval |
ONEZONE_IA | 30 days | Infrequent access, single AZ |
INTELLIGENT_TIERING | None | Unknown or changing access patterns |
GLACIER | 90 days | Archive, minutes-to-hours retrieval |
DEEP_ARCHIVE | 180 days | Long-term archive, 12-hour retrieval |

