Lifecycle Configuration Reference
A lifecycle configuration is a JSON file in which you define the rules you want to apply to the objects of a bucket. With a lifecycle configuration, you can apply an expiration date to the objects stored in a bucket.
This page describes the elements you can specify in a lifecycle configuration file. Once you have written the file, you need to apply it to your bucket. For more information, see Applying a Lifecycle Configuration to Your Bucket.
A delay is to be expected during object deletion. |
To create a lifecycle configuration, you need to create a JSON file following this structure:
{
"Rules": [
{
"ID": "string",
"Status": "Enabled",
"Expiration": {
"Date": "2050-01-01T00:00:00Z",
"Days": integer,
"ExpiredObjectDeleteMarker": false
},
"NoncurrentVersionExpiration": {
"NoncurrentDays": integer
},
"AbortIncompleteMultipartUpload": {
"DaysAfterInitiation": integer
},
"Filter": {
"And": {
"Prefix": "string",
"Tags": [
{
"Key": "test",
"Value": "test"
}
]
}
}
}
]
}
This file contains the following attributes:
Attribute | Required | Description | ||||
---|---|---|---|---|---|---|
|
Yes |
One or more rules in the lifecycle configuration.
|
||||
|
No |
A unique name for the rule.
|
||||
|
Yes |
If |
||||
|
No |
Specifies the expiration date for the objects.
|
||||
|
No |
The lifetime of the objects, in days.
|
||||
|
No |
The lifetime of the objects, using a timestamp. The date must be in ISO 8601 (for example
|
||||
|
No |
If
|
||||
|
No |
If |
||||
|
No |
The lifetime, in days, of noncurrent objects. |
||||
|
No |
Specifies when an incomplete multipart upload is aborted. For more information, see Using Multipart Upload. |
||||
|
No |
The number of days after which an incomplete multipart upload is aborted. |
||||
|
Yes |
Specifies the objects the rule applies to.
|
Related Pages