S3 Lifecycle Management in AWS

Zixin Huang
2 min readNov 20, 2019

--

e.x. lifecycle use case

A company runs a monthly analysis on logs users uploaded across current month. After the analysis is finished, those logs may not be accessed frequently in the following 3 months. After 3 months, those logs are not useful anymore and most likely users would not access them. However, just in case in emergency, users need to check those logs, company still has the responsibility to store them.

In such scenario, there are 2 problems, the first one is if we always keep those logs in the standard tier, it’s unnecessarily costly to store old unlikely-to-be-accessed logs in a standard-tier fare. The second problem is if the company wants to change those objects to different storage tiers manually, the company needs to hire professionals and pay for the expensive labour cost. Lifecycle management can solve those two problems.

how?

@S3 → Your bucket → management →lifecycle → add lifecycle rules →enter customized rule’s name → window as below

In the lifecycle window, we can configure the bucket and set different storage tiers in a temporal manner to suit user’s business requirement. To solve the problem as above, first, after 30 days when the monthly analysis is finished, we can change storage tiers of logs to Standard-IA[infrequently accessed], then after 3 months, we change change the storage tiers to Glacier, which cost way less than standard tier. So overall, the company doesn’t need to pay for the standard tier fee for barely accessed data and doesn’t need to hire professionals to manually change storage tiers.

users can also set up lifecycle rules for previous versioned objects. How? tick Previous versions → add transition rules

what is lifecycle management?

lifecycle management helps users to store data in a cost effective way by using two actions:

  • storage transition: define when objects transition to another storage tier.
  • expiration: define when objects to be deleted.

lifecycle rules for versioned objects

users can configure rules to transition storage tiers for previously versioned objects, which is very helpful since users usually accessed the current version objects and infrequently accessed objects with previous versions.

--

--