Skip to main content

Lifecycle Management Policy

An Azure Storage Lifecycle Management Policy is a rule-based configuration that automatically transitions blobs between access tiers (Hot, Cool, Archive) or deletes them based on age or last-access time, without manual intervention. It's the primary cost-optimization lever for large or growing blob storage accounts where most data cools off in access frequency over time.

Lifecycle Management Policy

Instead of manually moving old blobs to cheaper tiers, a lifecycle policy defines rules like "move to Cool after 30 days, Archive after 180, delete after 730" that run automatically.

Why It Matters in Production

Zerodha applies a lifecycle policy to its audit-log container so logs age from Hot to Cool to Archive automatically, cutting storage cost by roughly 70% over a year.

az storage account management-policy create
--account-name zerodhaprodstorage --resource-group zerodha-prod-rg
--policy @lifecycle-policy.json

Common Mistake

Forgetting that lifecycle rules apply based on last-modified time, not creation time — a frequently-updated blob never ages into cheaper tiers.

Frequently Asked Questions

How does a Lifecycle Management Policy decide when to move a blob between tiers?

Rules match blobs by name prefix or blob index tags, then apply conditions based on days since last modification or days since last access (the latter requires last-access tracking to be enabled separately, since it's not on by default). A typical rule moves blobs to Cool after 30 days of no modification, to Archive after 90 days, and deletes them after a retention period — the policy engine runs as a background process, not synchronously on access.

What's a common cost mistake teams make with Archive tier and lifecycle policies?

Setting a policy to auto-transition data to Archive tier without accounting for retrieval behavior — Archive blobs aren't instantly readable; rehydrating them back to Hot or Cool can take hours (standard priority) and incurs both a rehydration fee and early-deletion penalties if the blob is deleted before its minimum retention period (180 days for Archive). Applying Archive-tier policies to data that's occasionally accessed on short notice creates unexpected latency and cost, not savings.