Blob Containers, Access Tiers and Lifecycle Management
30-second answer
A container groups blobs inside a storage account. Its anonymous access level is Private (default), Blob or Container, and anonymous access only works if the account allows it (new accounts don't). Access tiers trade storage price for access price: Hot, Cool (30-day minimum), Cold (90 days) and Archive (180 days, offline, rehydrating takes up to 15 hours at Standard priority). Archive is supported on LRS, GRS and RA-GRS accounts. A lifecycle management policy is a set of JSON rules that moves blobs to cooler tiers or deletes them (and old versions and snapshots) based on days since modification, creation or last access, and runs about once a day.
Simulate it » No Azure account neededExam objective: 2.3.2 Create and configure a container in Azure Blob Storage. 2.3.3 Configure storage tiers. 2.3.6 Configure blob lifecycle management. (Skills measured as of April 17, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Open <strong>Containers</strong> and select <strong>+ Container</strong>.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Open Containers and select + Container.
- Name it invoices. Anonymous access level is greyed out at Private because the account doesn’t allow anonymous access. Good.
- One blob at a time: select invoice-2025-01.pdf → Change tier → Cold. Cool has a 30-day minimum, Cold 90, Archive 180.
- Doing that by hand doesn’t scale. Open Lifecycle management and + Add a rule.
- Details: name it, limit it with a filter, block blobs only.
- Base blobs: Cool after 30 days since last modified, Archive after 180. Add a delete step too if you want.
- Filter set: only blobs whose names start with invoices/. Select Add. The policy runs about once a day and can take up to 24 hours to start.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Access tiers and lifecycle management
Blobs sit in Hot, Cool (30-day minimum), Cold (90 days) or Archive (180 days, offline). A lifecycle management rule moves or deletes blobs by age or last access, about once a day. Reading an archived blob means rehydrating it first.
🤔 What happens if…
Read this tour as text
- The front door: the storage firewall. Every account has a public endpoint that accepts all networks by default. Set the default action to Deny and only what you list gets in: virtual network rules (subnets with the Microsoft.Storage service endpoint), IP rules (public addresses only) and trusted Azure services if you tick the exception.
- Three ways in, plus one for file shares. Callers prove who they are with an account key (full control), a SAS (limited rights for limited time) or a Microsoft Entra ID token checked against RBAC data roles. For SMB file shares, users bring a Kerberos ticket from AD DS, Microsoft Entra Domain Services or Microsoft Entra Kerberos.
- SAS tokens and stored access policies. A service SAS can point at a stored access policy on the container (up to 5 per container). The policy holds the permissions and expiry, so deleting or editing it revokes every SAS that names it. An ad hoc SAS can only be revoked by regenerating the key that signed it.
- Rotate access keys. Each account has two keys so you can rotate without downtime: move apps to key2, regenerate key1, and next time do the reverse. A key expiration policy flags old keys. Regenerating a key kills every SAS signed with it.
- Encryption at rest. Azure Storage always encrypts data with AES-256. By default Microsoft manages the key. With a customer-managed key in Key Vault (soft delete and purge protection on), the account’s managed identity wraps and unwraps its data key with your key, and you can revoke it.
- Redundancy and a region outage. LRS keeps 3 copies in one datacenter, ZRS spreads 3 across availability zones, GRS adds an async copy in the paired region and GZRS combines both. RA- versions let you read the secondary. A customer-managed failover promotes the secondary when the primary region is down.
- Moving data: AzCopy and object replication. AzCopy moves files in parallel from the command line, signed in with Microsoft Entra ID (and a Storage Blob Data role) or with a SAS. Storage Explorer does the same with a GUI. Object replication keeps copying new block blobs to another account by itself.
- Access tiers and lifecycle management. Blobs sit in Hot, Cool (30-day minimum), Cold (90 days) or Archive (180 days, offline). A lifecycle management rule moves or deletes blobs by age or last access, about once a day. Reading an archived blob means rehydrating it first.
- Undo buttons: soft delete, versioning and snapshots. Blob soft delete and container soft delete keep deleted items for 1 to 365 days. Versioning keeps every previous version of a blob. For Azure Files, share snapshots are read-only point-in-time copies and share soft delete keeps a deleted share.
Contoso Media needs a photo account that is locked down on day one, ages old files into cheaper tiers, uses its own encryption key, survives a zone failure and keeps a copy in another region. Build it one decision at a time.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
Seven years of invoices sit in Hot storage and the bill keeps growing.
😊 THE SOLUTION
Move old blobs to Cool, Cold and Archive automatically with a lifecycle rule.
- Paying Hot prices for old files✓ Cool, Cold, Archive
- Moving blobs by hand✓ Lifecycle rules
- Archive is offline✓ Plan for rehydration
Start with a question
Why keep last year's tax papers on your desk when they could go in a box in the loft?
This month’s bills sit on your desk because you touch them daily. Last year’s go in a filing cabinet. Papers from five years ago go in a box in the loft: cheap to keep, but you need a ladder and an afternoon to get them out.
Blob access tiers are the desk (Hot), the cabinet (Cool and Cold) and the loft (Archive). A lifecycle policy is the house rule that moves papers along on their own.
Explain it like I’m 10
The technical explanation
Containers
Portal: Data storage > Containers > + Container. Name it (3 to 63 lowercase letters, numbers and hyphens) and pick the anonymous access level:
| Level | Anonymous users can |
|---|---|
| Private | Nothing (the default) |
| Blob | Read blobs if they know the URL |
| Container | Read blobs and list the container |
Anonymous access is possible only when the account setting Allow Blob anonymous access is on. New accounts have it off, and with it off every container stays private whatever you choose. Advanced options include a default encryption scope and version-level immutability.
Access tiers
| Tier | Online | Minimum days | Good for |
|---|---|---|---|
| Hot | Yes | None | Data in active use |
| Cool | Yes | 30 | Backups, older content read occasionally |
| Cold | Yes | 90 | Rarely read, must be instant when read |
| Archive | No | 180 | Compliance archives, raw data you may never read |
The account has a default tier (Hot, Cool or Cold) that blobs inherit; you can set a tier per blob. Moving out of a tier early adds an early deletion charge. Rough feel for 1 TB a month: Hot around $20, Archive around $2 (illustrative). Archive is available on LRS, GRS and RA-GRS accounts only.
To read an archived blob you rehydrate it: change its tier to Hot, Cool or Cold, or copy it to an online blob. Standard priority can take up to 15 hours; High priority is usually under an hour for blobs smaller than 10 GB and costs more.
Lifecycle management
Portal: Data management > Lifecycle management > + Add a rule. A rule has:
- Scope and filters: all blobs or a filter set of blob prefixes (such as
invoices/) and blob index tags; blob type block blobs (append blobs support delete only); subtypes base blobs, snapshots, versions. - Conditions:
daysAfterModificationGreaterThan,daysAfterCreationGreaterThanordaysAfterLastAccessTimeGreaterThan(which needs last access time tracking turned on). - Actions:
tierToCool,tierToCold,tierToArchive,delete, andenableAutoTierToHotFromCool.
A policy holds up to 100 rules. Azure runs it about once a day, and a new or changed policy can take up to 24 hours to start acting. If several actions match one blob, the cheapest one wins (delete, then Archive, then Cold, then Cool).
{ "rules": [ { "enabled": true, "name": "age-out-invoices", "type": "Lifecycle",
"definition": {
"filters": { "blobTypes": ["blockBlob"], "prefixMatch": ["invoices/"] },
"actions": {
"baseBlob": {
"tierToCool": { "daysAfterModificationGreaterThan": 30 },
"tierToCold": { "daysAfterModificationGreaterThan": 90 },
"tierToArchive": { "daysAfterModificationGreaterThan": 180 },
"delete": { "daysAfterModificationGreaterThan": 2555 } },
"version": { "delete": { "daysAfterCreationGreaterThan": 90 } } } } } ] }
az storage container create --account-name stcontosoprod -n invoices # private
az storage blob set-tier --account-name stcontosoprod -c invoices -n invoice-2025-01.pdf --tier Cold
az storage account management-policy create -g rg-storage-prod --account-name stcontosoprod \
--policy @lifecycle.json
$ctx = (Get-AzStorageAccount -ResourceGroupName rg-storage-prod -Name stcontosoprod).Context
New-AzStorageContainer -Name invoices -Permission Off -Context $ctx
$blob = Get-AzStorageBlob -Container invoices -Blob invoice-2025-01.pdf -Context $ctx
$blob.BlobClient.SetAccessTier("Cold")
Architect level Smaller details that cost money
Changing tiers costs write operations, and reading Cool, Cold and Archive data costs more per GB. Lifecycle rules that move millions of tiny blobs can cost more than they save, so filter by prefix and consider packing small files. Versions and snapshots are billed too; give them their own delete actions in the same policy.
Real-world business scenario
Proseware Insurance (fictional)
- The problem
- Seven years of claim PDFs sat in Hot storage. Almost nothing older than a month was opened, and the storage bill grew every quarter.
- What they used
- A private claims container in a GRS account with a lifecycle rule: Cool after 30 days, Cold after 90, Archive after 180 and delete after seven years, plus a rule deleting old versions after 90 days.
- Why that choice
- Old claims cost a fraction of Hot prices, and nobody has to move files by hand. The rare archived claim is rehydrated with High priority.
- The result
- Storage cost for the container dropped sharply within six months, and auditors still get any claim within an hour.
When to use it and when not to
✓ Use it when…
- Data whose use drops with age, such as invoices, logs and backups.
- Compliance data you must keep for years but rarely read (Archive).
- Tidying up old versions and snapshots automatically.
✕ Think twice when…
- Data read unpredictably and urgently (Archive latency hurts).
- Short-lived data deleted within 30 days (early deletion charges in Cool).
- Zone-redundant accounts if you need Archive (not supported there).
↔ Alternatives to consider
- Cold tier instead of Archive when reads must be instant.
- Smart, per-blob tiering by last access with enableAutoTierToHotFromCool.
Test yourself with exercises
5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What's the difference between Cool and Archive?
Model answer
Cool is online: you can read a blob immediately, you just pay more per read and a bit less per GB than Hot, with a 30-day minimum. Archive is offline: it's the cheapest storage, but you can't read the blob until you rehydrate it, which can take up to 15 hours at Standard priority, and there's a 180-day minimum.
Intermediate You try to create a container with anonymous blob access and get an error. Why?
Model answer
The account setting Allow Blob anonymous access is off, which is the default for new accounts. No container can be made public until that's turned on at account level. I'd only do that for content that really should be public, and keep everything else private and shared with SAS.
Experienced developer How would you write a lifecycle rule for blobs that should go cool once nobody reads them?
Model answer
Turn on last access time tracking for the account, then use daysAfterLastAccessTimeGreaterThan in the tierToCool action, and optionally enableAutoTierToHotFromCool so a blob that gets read again goes back to Hot. Rules based on modification time don't need tracking. I'd filter with a prefix or blob index tags so the rule doesn't touch everything.
Scenario Finance keeps invoices for seven years and rarely opens anything older than a month. Design the storage.
Model answer
A private invoices container in an LRS or GRS account, because Archive isn't available on zone-redundant accounts. A lifecycle rule with prefix invoices/ moving blobs to Cool after 30 days, Cold after 90, Archive after 180, and deleting after about 2,555 days. Finance knows an archived invoice needs rehydrating, and urgent ones can use High priority.
Quick revision
Key points
- Container names 3-63 lowercase letters, numbers and hyphens.
- Anonymous access needs the account setting on; new accounts block it.
- Hot, Cool (30 d), Cold (90 d), Archive (180 d, offline).
- Rehydrate Archive with Set Blob Tier or a copy; Standard up to 15 hours, High usually under 1 hour for blobs under 10 GB.
- Archive works on LRS, GRS, RA-GRS only.
- Lifecycle rules run about daily; new policies can take up to 24 hours to act.
Important terminology
- Container
- A named group of blobs in a storage account, similar to a top-level folder.
- Anonymous access level
- Private, Blob (anonymous read of blobs) or Container (anonymous read and list), allowed only if the account permits anonymous access.
- Access tier
- Hot, Cool, Cold or Archive, which sets the balance between storage cost and access cost for a blob.
- Early deletion charge
- A charge for moving or deleting a blob before the tier's minimum days (30 Cool, 90 Cold, 180 Archive).
- Rehydration
- Moving an archived blob back to an online tier so it can be read. Standard or High priority.
- Lifecycle management policy
- Account-level JSON rules that move or delete blobs, versions and snapshots by age or last access.
Common mistakes
- Setting Archive as the account default tier (only Hot, Cool or Cold can be).
- Using daysAfterLastAccessTimeGreaterThan without enabling access tracking.
- Expecting a lifecycle change to happen instantly.
Exam tips
- "Cheapest storage, can wait hours to read" = Archive.
- "Rarely read, needed immediately when read" = Cool or Cold.
- "Move blobs automatically by age" = lifecycle management.
Five quick revision questions
-
1.What is the minimum storage duration for the Cold tier?Show
90 days.
-
2.How long can Standard priority rehydration from Archive take?Show
Up to 15 hours.
-
3.Which account redundancy options support the Archive tier?Show
LRS, GRS and RA-GRS.
-
4.Which lifecycle condition needs last access time tracking?Show
daysAfterLastAccessTimeGreaterThan.
-
5.Which anonymous access level allows listing blobs in a container?Show
Container.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Blob Soft Delete and Versioning
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.