Why S3 lifecycle policies
S3 lifecycle policies allow you to do two things:
- Reduce cost by deleting data that is not longer required.
- Implement your security policies by :
- Retaining data for the required duration and reducing cost by moving it to low cost storage.
- Deleting data that you are not allowed to retain for a period beyond a specified period.
S3 lifecycle policy transition types
There are two kinds of transition policies within an S3 bucket.
- The first kind of policy allows you to expire an object and
- The second kind of policy allows you to transition an object to a low cost storage tier. For example, you can transition an object from a standard storage to an infrequently access storage and then onto a glacier storage.
In the transition policy you can specify the number of days after which you want to transition an object. For example, one possible transaction policy is when you want to transition to infrequently access storage from your standard Storage after 30 days and then move on to Glacier Storage after 90 days and then possibly Glacier deep archive after 180 days. You can then choose to retain the object for a year or two and eventually retire it.
S3 lifecycle policy retire vs delete
one confusion arises from the fact that the object is retired and not deleted . Essentially retired means that the object is marked for delete and S3 deletes the object after a certain time period. You’re not charged for the object after you retire it.