Blob access tiers and lifecycle rules

Azure Blob access tiers let you pay less for data you hardly ever touch. The same file can sit in Hot, Cool, Cold or Archive, and every step down lowers the storage price but adds a charge or a wait when you read it.

Most storage bills are stuffed with logs and backups nobody has opened in months, all sitting in Hot. Lifecycle rules move them down for you, and soft delete rescues you when somebody deletes the wrong thing.

In the lab you’ll tier blobs by hand, write a lifecycle rule, get stuck on an archived file and bring it back, and then recover a deleted blob.

TimeYou needCostBy the end you can
About 45 minutes, plus up to an hour waiting for a rehydrateThe storage account from Lesson 21, the CLIUnder one US cent: a few tiny blobs and one high-priority rehydrateChoose tiers by access pattern, automate them, rehydrate from Archive and undelete blobs

What it is, in one line

Access tiers give you a lower storage price in return for higher read costs, and with Archive you also wait hours before you can read the data.

In Simple Words

The kitchen at home

Milk you use every day sits at the front of the fridge (Hot), the jam you open once a month is pushed to the back (Cool), and the frozen peas for special days are in the freezer (Cold). Grandma’s big cooking pot is up in the loft, which is Archive: it takes no room in the kitchen, but someone has to fetch the ladder, so you have to ask the day before. A well-run home moves things to the right place by itself as they get used less, and that’s what a lifecycle rule does.

Engineer's View

Tiers, prices and the rules behind them

TierPrice per GB-month*Minimum daysReading the data
HotUSD 0.02NoneCheapest reads
CoolUSD 0.01130Pay per GB read
ColdUSD 0.004590Higher read cost
ArchiveUSD 0.002180Offline; rehydrate first (up to 15 hours)

*LRS, Central India, first 50 TB, from the Azure Retail Prices API on 20 Oct 2026. 1 TB for a month is about USD 20.48 in Hot and USD 2.05 in Archive.

  • Early deletion: if you delete, overwrite or move a blob out of Cool, Cold or Archive before its minimum days are up, you’re charged for the rest of that period.
  • Account default tier (Hot, Cool or Cold) is used for blobs that don’t have a tier set, and they show as “inferred”. Archive can only be set on individual blobs.
  • Archive works with LRS, GRS and RA-GRS accounts but not with ZRS or GZRS. To rehydrate, use set-tier (Standard takes up to 15 hours, High is often under an hour for blobs under 10 GB) or copy it to a new online blob.
  • Lifecycle management: JSON rules on the account that tier or delete blobs based on days since modification, creation or last access. The rules run roughly once a day, and a new policy can take up to 24 hours before it kicks in.
  • Smart tier: a newer account setting that shifts block blobs between Hot, Cool and Cold based on access, without early deletion or retrieval fees. It needs a ZRS, GZRS or RA-GZRS account, and it leaves Archive out.
  • Soft delete: holds on to deleted blobs or containers for 1 to 365 days so you can undelete them. Accounts created with the CLI start with it switched off.

How it works, step by step

Here’s what a lifecycle rule does to a single log file over a year:

Azure Blob access tiers compared by price, minimum days and reads
  1. Day 0: the app writes logs/day1.log in Hot.
  2. Day 31: the daily lifecycle run moves it to Cool.
  3. Day 91: moved to Cold.
  4. Day 181: moved to Archive, and from now on it can’t be read directly.
  5. Day 366: deleted, though with soft delete on you can still undelete it during the retention period.

The thresholds match the minimum days, so each move only happens after the previous tier’s minimum is over and you never pay an early deletion fee.

Azure Blob access tiers lifecycle rule moving a log over one year

Don’t archive anything someone might need in a hurry. An auditor who wants a file “today” and a 15-hour rehydrate are a bad combination.

Hands-on lab: Azure Blob access tiers and lifecycle

Before you run any command, double-check it

Read every command twice before you press Enter. Check the target: the system or account, the IDs, the names and the sizes. These commands are for learning and were tested in our lab, not on your system. At work, run the read-only list commands first, follow your change process, make sure a backup exists, and ask a second person to check anything that changes or deletes data. You run them at your own risk.

Load the name of your storage account:

$st = (Get-Content C:\azure-lab\storage.txt)

1Upload three log files

Run this:

1..3 | ForEach-Object { Set-Content -Path "C:\azure-lab\day$_.log" -Value "log line from day $_" }
1..3 | ForEach-Object { az storage blob upload --account-name $st --auth-mode login --container-name lab --name "logs/day$_.log" --file "C:\azure-lab\day$_.log" -o none }

2Move each one to a different tier

Run this:

az storage blob set-tier --account-name $st --auth-mode login --container-name lab --name logs/day1.log --tier Cool
az storage blob set-tier --account-name $st --auth-mode login --container-name lab --name logs/day2.log --tier Cold
az storage blob set-tier --account-name $st --auth-mode login --container-name lab --name logs/day3.log --tier Archive
az storage blob list --account-name $st --auth-mode login --container-name lab --query "[].{name:name, tier:properties.blobTier}" -o table

You should see this:

Name           Tier
-------------  -------
hello.txt      Hot
logs/day1.log  Cool
logs/day2.log  Cold
logs/day3.log  Archive

hello.txt has no tier of its own, so it follows the account default (Hot), while the other three have tiers set explicitly. Moving between Hot, Cool and Cold happens instantly.

3Write a lifecycle rule

Save the policy, apply it and then read it back:

$p = @'
{
  "rules": [
    {
      "enabled": true,
      "name": "logs-age-out",
      "type": "Lifecycle",
      "definition": {
        "filters": { "blobTypes": [ "blockBlob" ], "prefixMatch": [ "lab/logs/" ] },
        "actions": {
          "baseBlob": {
            "tierToCool":    { "daysAfterModificationGreaterThan": 30 },
            "tierToCold":    { "daysAfterModificationGreaterThan": 90 },
            "tierToArchive": { "daysAfterModificationGreaterThan": 180 },
            "delete":        { "daysAfterModificationGreaterThan": 365 }
          }
        }
      }
    }
  ]
}
'@
Set-Content -Path C:\azure-lab\lifecycle.json -Value $p
az storage account management-policy create --resource-group rg-saat-data --account-name $st --policy '@C:\azure-lab\lifecycle.json' -o none
az storage account management-policy show --resource-group rg-saat-data --account-name $st --query "policy.rules[].{name:name, enabled:enabled, prefix:join(', ', definition.filters.prefixMatch)}" -o table

You should see this:

Name          Enabled    Prefix
------------  ---------  ---------
logs-age-out  True       lab/logs/

Notice that the prefix starts with the container name, lab/logs/ and not logs/. Getting this wrong is the number one reason a lifecycle rule seems to “do nothing”.

4Turn on soft delete

Keep deleted blobs and containers for 7 days:

az storage account blob-service-properties update --resource-group rg-saat-data --account-name $st --enable-delete-retention true --delete-retention-days 7 --enable-container-delete-retention true --container-delete-retention-days 7 -o none
az storage account blob-service-properties show --resource-group rg-saat-data --account-name $st --query "{blobSoftDelete:deleteRetentionPolicy.days, containerSoftDelete:containerDeleteRetentionPolicy.days}" -o table

You should see this:

BlobSoftDelete    ContainerSoftDelete
----------------  ---------------------
7                 7
Azure Blob access tiers lab: blobs in four tiers and a lifecycle rule
One container, four tiers, and a rule that moves logs down as they age.

✅ Checkpoint: day1 to day3 are in Cool, Cold and Archive, the logs-age-out rule is on, and soft delete keeps deletes for 7 days.

Break It, Then Fix It

Both of these land as urgent tickets, and usually on a Friday evening.

1Break it: “The file won’t download”

Try reading the archived log:

az storage blob download --account-name $st --auth-mode login --container-name lab --name logs/day3.log --file C:\azure-lab\day3-back.log

You’ll get an error like this:

This operation is not permitted on an archived blob.
RequestId:5b1e...
Time:2026-10-20T16:05:11.0000000Z
ErrorCode:BlobArchived

Archive blobs are offline, and nobody can read them, the account owner included, until they’ve been rehydrated to an online tier.

Fix it: rehydrate with High priority and keep an eye on the status:

az storage blob set-tier --account-name $st --auth-mode login --container-name lab --name logs/day3.log --tier Hot --rehydrate-priority High
az storage blob show --account-name $st --auth-mode login --container-name lab --name logs/day3.log --query "{tier:properties.blobTier, status:properties.archiveStatus, priority:properties.rehydratePriority}" -o table

You should see something like this:

Tier     Status                    Priority
-------  ------------------------  ----------
Archive  rehydrate-pending-to-hot  High

While it’s still pending, any other tier change gets refused. Try one to see:

az storage blob set-tier --account-name $st --auth-mode login --container-name lab --name logs/day3.log --tier Cool
This operation is not permitted because the blob is being rehydrated.
ErrorCode:BlobBeingRehydrated

Wait for it to finish (normally under an hour with High), then download:

do { Start-Sleep -Seconds 300; $t = az storage blob show --account-name $st --auth-mode login --container-name lab --name logs/day3.log --query properties.blobTier -o tsv; $t } until ($t -eq 'Hot')
az storage blob download --account-name $st --auth-mode login --container-name lab --name logs/day3.log --file C:\azure-lab\day3-back.log -o none
Get-Content C:\azure-lab\day3-back.log

You should see this at the end:

Hot
log line from day 3

High priority costs more per GB than Standard, so for big restores plan ahead with Standard and warn people it might take until tomorrow.

2Break it: the blob deleted by mistake

Delete hello.txt and then go looking for it:

az storage blob delete --account-name $st --auth-mode login --container-name lab --name hello.txt
az storage blob list --account-name $st --auth-mode login --container-name lab --query "[].name" -o tsv
az storage blob list --account-name $st --auth-mode login --container-name lab --include d --query "[?deleted].{name:name, deleted:deleted}" -o table

You should see something like this:

logs/day1.log
logs/day2.log
logs/day3.log
Name       Deleted
---------  ---------
hello.txt  True

It’s missing from the normal list but shows up in the list that includes deleted items. Since you turned on soft delete in step 4 you can still get it back, and without step 4 it would be gone for good.

Fix it: undelete the blob:

az storage blob undelete --account-name $st --auth-mode login --container-name lab --name hello.txt
az storage blob download --account-name $st --auth-mode login --container-name lab --name hello.txt --file C:\azure-lab\hello-back.txt -o none
Get-Content C:\azure-lab\hello-back.txt

You should see this:

hello from lesson 21

To clean up, remove the logs and the lifecycle rule but leave soft delete on:

az storage blob delete-batch --account-name $st --auth-mode login --source lab --pattern 'logs/*' -o none
az storage account management-policy delete --resource-group rg-saat-data --account-name $st
az storage blob list --account-name $st --auth-mode login --container-name lab --query "[].name" -o tsv

You should see this:

hello.txt
Azure Blob access tiers errors: BlobArchived, rehydrate and undelete
An archived blob needs a rehydrate, and a soft-deleted one needs an undelete.

✅ Checkpoint: You brought back an archived blob and a deleted blob. Only hello.txt is left, and soft delete stays on.

The deleted logs hang around as soft-deleted copies for 7 days, which costs a fraction of a cent. The archived one also picks up a tiny early deletion charge because it left Archive before 180 days.

This happened at work

The audit request that took two days

A finance company set its transaction exports to go to Archive after 30 days to save money. Storage costs dropped by 85%, and for a year everyone was happy with that.

Then the auditors turned up wanting six months of exports “by end of day”, and the team discovered they were looking at 40,000 small archived files.

Standard rehydration was queued for up to 15 hours, High priority was capped per account per hour, and the cost per file kept adding up, so the audit ended up two days late.

What they changed: exports now move to Cool at 30 days and Cold at 90, and only go to Archive after 13 months, by which time audits are rare. Files get zipped into monthly bundles before archiving, so a restore means a few large blobs instead of thousands of tiny ones, and the runbook spells out how long a restore takes so nobody promises “today” again.

Common mistakes and troubleshooting

MistakeWhat you seeWhat to do
Lifecycle prefix without the containerRule runs, nothing movesWrite it as container/prefix, for example lab/logs/.
Expecting a new rule to act at onceNothing changes for a dayRules run once a day, so give it up to 24 hours.
Reading an archived blobBlobArchived (409)Rehydrate it with set-tier, or copy it to an online tier.
Archiving files that are needed urgentlyHours of waiting during an incidentPut “rare but urgent” data in Cold instead.
Moving blobs before the minimum daysEarly deletion chargesLine up the rule days with the 30/90/180 minimums.
Archiving millions of tiny filesSlow, costly restoresBundle the small files together before archiving.
Soft delete offDeleted data gone for goodTurn on blob and container soft delete.

Interview questions

Click a question to open it. Each one is phrased the way an interviewer would ask it, and underneath you’ll find why they ask it and one way you could answer in your own words.

Fresher level

1. What are the Azure Blob access tiers?

Why they ask this: It’s the basic idea.

How you might answer: There’s Hot, Cool, Cold and Archive. As you go down, storage gets cheaper but reading gets more expensive, and Archive stays offline until you rehydrate it.

2. What happens when you try to read an archived blob?

Why they ask this: They want to hear that you know it’s offline.

How you might answer: The read fails with BlobArchived. You have to rehydrate it first to Hot, Cool or Cold with Standard or High priority, which can take up to 15 hours, or copy it into a new blob in an online tier.

3. What does soft delete do?

Why they ask this: It’s a basic check on data protection.

How you might answer: It keeps deleted blobs or containers for a set number of days so you can undelete them. That protects you from mistakes, but not from someone deleting the whole storage account.

2–5 years experience

4. A lifecycle rule was created yesterday but no blobs moved. What do you check?

Why they ask this: They want to see real troubleshooting.

How you might answer: I’d check that the prefix includes the container name, that the blob type filter matches, that the days condition really has been met and that the rule is enabled. Rules only run about once a day, so I’d also give it 24 hours after creating or changing it.

5. How do you choose between Cool, Cold and Archive?

Why they ask this: They want to hear about access patterns and minimums.

How you might answer: It depends on how often and how fast the data is needed. Cool suits monthly access and has a 30-day minimum, Cold is for rare access but still online, with 90 days, and Archive is for compliance data that can wait hours, with 180 days.

6. How do you bring back a large amount of archived data efficiently?

Why they ask this: They’re checking how you plan rehydration.

How you might answer: I’d use Standard priority for the big batches and keep High for small urgent items, because High has a throughput limit at account level. I’d rehydrate by copying into a new container so the archive stays as it is, and use Event Grid to tell me when each blob is ready.

Senior level

7. How would you design a data retention strategy for logs and backups?

Why they ask this: They want cost, compliance and recovery thought through together.

How you might answer: I’d map each type of data to how often it’s read and how long we have to keep it. Lifecycle rules move it from Hot to Cool to Cold to Archive and delete it at the end of retention. Soft delete and versioning cover mistakes, immutability policies cover compliance, and we test restores, rehydration times included.

8. When would you use smart tier instead of lifecycle rules?

Why they ask this: They want to know you follow the newer features.

How you might answer: When access is hard to predict and the account is zone-redundant. Smart tier moves block blobs between Hot, Cool and Cold based on real access, with no early deletion or retrieval fees, but you still need lifecycle rules for Archive, for deletes, and for LRS or GRS accounts.

9. Soft delete is on. Is the data safe from an attacker?

Why they ask this: They want to see you think in layers of protection.

How you might answer: Not completely. An attacker with enough rights can delete the account or switch soft delete off. So I’d add a delete lock on the account, use least-privilege roles, keep critical data in immutable storage, and hold backups in a separate subscription.

Quick quiz

Q1. Which tier is offline until rehydrated?

  1. Hot
  2. Cool
  3. Cold
  4. Archive
Show answer

D — Archive blobs must be rehydrated first.

Q2. What is the minimum storage period for Cold?

  1. 30 days
  2. 60 days
  3. 90 days
  4. 180 days
Show answer

C — Cold has a 90-day minimum on general-purpose v2.

Q3. A lifecycle rule for lab/logs/ is written as logs/. Result?

  1. Works anyway
  2. Nothing matches
  3. All blobs deleted
  4. Error at save
Show answer

B — The prefix must include the container name.

Q4. Which error means the blob is archived?

  1. BlobArchived
  2. AuthorizationFailure
  3. PublicAccessNotPermitted
  4. QuotaExceeded
Show answer

A — BlobArchived (409) is returned for archived blobs.

Q5. Which feature lets you undelete a blob?

  1. Lifecycle rules
  2. Soft delete
  3. Archive
  4. RA-GRS
Show answer

B — Soft delete keeps deleted blobs for the retention period.

Quick recap

You can now bring storage costs down without losing data or getting stuck.

  • Hot, Cool, Cold and Archive swap storage price against read cost and speed.
  • Minimum days: 30 Cool, 90 Cold, 180 Archive.
  • Archive needs a rehydrate, which takes up to 15 hours on Standard priority.
  • Lifecycle rules use container/prefix and run roughly once a day.
  • With soft delete on, a deleted blob is just a quick undelete away.

Next lesson

Lesson 24: Shared access signatures and account keys → Next you’ll create SAS links with the right scope and expiry and see why account keys are dangerous.

Further reading: Azure Blob access tiers

Want to go deeper into Azure Blob access tiers? See Microsoft’s Access tiers for blob data and Lifecycle management overview. You can also see the full plan for this course on the Azure Cloud Administration course page.

Scroll to Top

This website uses cookies

We use a few cookies to keep this site working. If you allow it, we also use Google Analytics to count visits so we can improve our lessons. You can accept all, deny the optional ones, or choose what to allow.