S3 Object Lifecycle Management
S3 can manage the object lifecycle by using a lifecycle configuration. This defines how S3 manages objects throughout their lifetime.
Lifecycle configuration allows for simplified object lifecycle management. Moving of less frequently used objects, backup or archive of data for several year, or permanent deletion.
All transitions are controlled automatically by S3
The Lifecycle Management rules that apply to a bucket cover all existing objects as well as those that will be added to it.
S3 Object Lifecycle Management allows 2 types of behaviorTransition where the object’s storage class changes
Expiration occurs when the objects expire and are permanently erased
Versioning can be used to configure Lifecycle Management. This allows for storage of one current object version as well as zero or more non-current objects versions.
The object’s lifecycle management is applicable to both non-versioning buckets and versioning enabled buckets
For non-versioned buckets, the transition period begins at the object’s creation.
For Versioned buckets,Transitioning period for the current object is calculated for the object creation date
The transition period for a noncurrent object is calculated from the date the object became noncurrent versioned.
S3 uses the number days since its predecessor was created as the number days an object is not current.
S3 calculates time by adding the number days specified in the rule and the object creation time, and then rounding off the resulting time to midnight UTC for e.g. If an object was created at 10:30 UTC on 15/1/2016, and you specify 3 days in the transition rule, it will result in 18/1/2016 10:30 UTC. This is then rounded off to the next day’s midnight time of 19/1/2016 00:00 UTC.
It is not possible to configure the lifecycle of MFA-enabled buckets.
1000 lifecycle rules may be configured for each bucketS3 Object Management RulesSupported Lifecycle Transitions
S3 Standard storage class -> Other storage class
Any storage class -> S3 Glacier Deep Archive storage clases.
S3 Standard-IA -> S3 Intelligent-Tiering or S3 One Zone-IA
S3 Intelligent-Tiering storage class -> S3 One Zone-IA storage class.
S3 Glacier storage class -> S3 Glacier Deep Archive storage class.
Transitions in the unsupported lifecycle
Any storage class X S3 standard
Any storage class X with reduced redundancy
S3 Intelligent-Tiering X S3 Standard-IA
S3 One Zone-IA X S3 Standard-IA or S3 Intelligent-Tiering
Lifecycle Transitions Constraints
STANDARD -> (128 KB & 30 days) -> STANDARD-IA or One Zone-IA or S3 Intelligent-TieringLarger Objects – Only objects with a size more than 128 KB can be transitioned, as cost benefits for transitioning to STANDARD-IA or One Zone-IA can be realized only for larger objects
Smaller Objects 128 KB – S3 doesn’t transition objects smaller than 128KB
Minimum 30 Days – Objects should be kept for at least 30 consecutive days in their current storage class before being moved to the STANDARD or One Zone IA. Younger objects are often accessed more often or deleted earlier than is appropriate for STANDARD or One Zone IA.
GLACIER -> (90 Days) -> Permanent Delition OR GLACIER Deep Archives -> (180 Days) -> Permanent Deceletion. Glacier archives data for free if the objects that were deleted are archived for at least three months.
S3 charges a prorated fee for early deletion if the object is not deleted or overwritten within three month of its archiving.
Glacier objects are archived using object lifecycle management. This is done asynchronously, so there may be some delay between the transition date in lifecycle configuration rules and the actual date of the physical transformation. AWS charges Glacier prices based upon the rule’s transition date.
Current versions are eligible for versioning-enabled bucketTransition or Expiration actions
NoncurrentVersionTransition