DEV Community

Vlad Z
Vlad Z

Posted on Edited on

Thirty days: where every storage lifecycle rule should start

Thirty days is the number I'd put on the first move of every lifecycle rule

Most buckets have no rule at all. Everything stays in the most expensive class forever, because nobody was ever asked to decide when data stops being hot

A default that works for most teams

If untouched for:
30 Days: move to the infrequent access class
120 Days: move to an archive class
Old object versions: expire after 30 days, keep one as backup
Incomplete multipart uploads: abort after 7 days

Why 30 days for the first move

Infrequent access storage costs far less per GB, and data untouched for 30 days is usually not read again, so the retrieval fee seldom bites

S3 needs 30 days in Standard before Standard-IA and Nearline bills a 30 day minimum, so earlier gains nothing

Why 120 days for archive

Archive classes bill a minimum of 90 days on S3 and up to 365 on GCS, and retrieval can take hours, so data there is cold, not infrequent. 120 is a conservative default, a buffer above the minimum

The traps

Infrequent access classes charge a minimum object size and a retrieval fee. A bucket full of tiny files can cost more after the move than before it, and transitions are billed per 1,000 objects, so millions of small files make the move itself expensive

Data that gets read every week does not belong there at all

If access is genuinely unpredictable, use Intelligent-Tiering instead of guessing. Objects under 128 KB are not tiered and larger ones pay a monitoring fee, so check your object size distribution first

Deletion is a policy too

Old versions and abandoned multipart uploads are invisible in the console and they bill every month

How to check yours

Look at storage by class, then at the last access date of the biggest prefixes. If more than half of the bytes are in Standard and nobody has read them in 60 days, the rule is missing

These are starting defaults, adjust to how your data is read

Data that has no expiry date is data nobody owns

Which bucket in your account has the oldest data sitting in Standard right now?

Top comments (0)