Azure Storage

💤0
Lv 10 XP
← ☁️ Microsoft Azure · AZ-104 Administration

Azure Storage

Intermediate ⭐ 80 XP ⏱ 18 min #azure#az-104#storage#blob

Use storage accounts, blob tiers, redundancy options, and secure access.

📖Theory

A storage account is the container for Azure’s storage services: Blob (objects), Files (SMB shares), Queues, and Tables. Two dimensions you must understand for AZ-104:

  • Access tiers (Blob): Hot (frequent), Cool (infrequent, ~30 days), Cold, Archive (rare, hours to retrieve). Cheaper storage = costlier/slower access.
  • Redundancy: LRS (3 copies in one datacenter), ZRS (across zones), GRS (replicated to a paired region), GZRS (zones + region).

Secure access with Entra ID + RBAC (preferred), SAS tokens (scoped, time-limited), or account keys (avoid). Lifecycle rules auto-move blobs to cheaper tiers as they age.

🌍Real-World Example
az storage account create -g rg-data -n stmyapp01 \
  --sku Standard_GRS --access-tier Hot

# Generate a read-only SAS for a blob, valid 1 hour
az storage blob generate-sas --account-name stmyapp01 \
  -c uploads -n report.pdf --permissions r \
  --expiry 2026-06-22T15:00Z
✍️Hands-On Exercise
  1. Choose an access tier for: live website assets, monthly backups, 7-year archives.
  2. Pick a redundancy option that survives a full region outage.
  3. Explain why a SAS token is safer to share than an account key.
  4. Describe a lifecycle rule that archives blobs older than 90 days.
🧾Cheat Sheet
OptionUse
Hot tierFrequent access
Cool / ColdInfrequent (30+ days)
ArchiveRare, slow retrieval
LRS3 copies, one datacenter
ZRSAcross availability zones
GRS / GZRSReplicated to paired region
SAS tokenScoped, time-limited access
💬Common Interview Questions
What are Azure Blob access tiers?

Hot (frequent access, higher storage cost), Cool/Cold (infrequent, lower storage but higher access cost), and Archive (rarely accessed, cheapest, retrieval takes hours). Lifecycle policies move data between them.

What's the difference between LRS, ZRS, and GRS?

LRS keeps three copies in one datacenter; ZRS spreads copies across availability zones; GRS also replicates to a paired region for regional disaster protection.

Why prefer a SAS token over the storage account key?

A SAS grants narrowly scoped, time-limited, permission-specific access, whereas the account key grants full control and can’t be easily revoked without rotation.

📚Official Documentation

📝 My notes on this topic

Auto-saves as you type