The time between when a new version of the object is uploaded to the bucket and when old versions of the object expire.
For buckets with versioning enabled (or suspended), specifies the time, in days, between when a new version of the object is uploaded to the bucket and when old versions of the object expire. When object versions expire, Amazon S3 permanently deletes them. If you specify a transition and expiration time, the expiration time must be later than the transition time.
noncurrentVersionTransitions?
Type: NoncurrentVersionTransition[] (optional)
One or more transition rules specify when non-current objects transition to a specified storage class.
Only for buckets with versioning enabled (or suspended).
If you specify a transition and expiration time, the expiration time must be later than the transition time.
xxxxxxxxxx
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as s3 from '@aws-cdk/aws-s3';
import * as cdk from '@aws-cdk/core';
declare const storageClass: s3.StorageClass;
declare const tagFilters: any;
const lifecycleRule: s3.LifecycleRule = {
abortIncompleteMultipartUploadAfter: cdk.Duration.minutes(30),
enabled: false,
expiration: cdk.Duration.minutes(30),
expirationDate: new Date(),
expiredObjectDeleteMarker: false,
id: 'id',
noncurrentVersionExpiration: cdk.Duration.minutes(30),
noncurrentVersionsToRetain: 123,
noncurrentVersionTransitions: [{
storageClass: storageClass,
transitionAfter: cdk.Duration.minutes(30),
// the properties below are optional
noncurrentVersionsToRetain: 123,
}],
objectSizeGreaterThan: 123,
objectSizeLessThan: 123,
prefix: 'prefix',
tagFilters: {
tagFiltersKey: tagFilters,
},
transitions: [{
storageClass: storageClass,
// the properties below are optional
transitionAfter: cdk.Duration.minutes(30),
transitionDate: new Date(),
}],
};
https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-s3.LifecycleRule.html