Create and Configure Storage Accounts: Types, Redundancy, Blob Containers, Access Tiers and Lifecycle Rules
Storage Services
| Service | What it stores |
|---|---|
| Blob | Objects: images, backups, logs, big data |
| Files | SMB and NFS file shares |
| Queue | Simple messages |
| Table | Simple NoSQL key-value |
Account Settings
- Standard general-purpose v2 for most needs. Premium accounts use SSD for low latency
- Name: 3 to 24 characters, lowercase letters and numbers, globally unique
- Endpoint example:
https://stdemo482.blob.core.windows.net - Default access tier: Hot or Cool
Redundancy
| Option | Copies |
|---|---|
| LRS | 3 copies in one datacenter |
| ZRS | 3 copies across availability zones in one region |
| GRS | LRS plus a copy in the paired region (asynchronous) |
| RA-GRS | GRS plus read access to the secondary |
| GZRS / RA-GZRS | ZRS in primary plus a secondary region copy |
bash
az storage account create -g rg-demo -n stdemo482 -l centralindia --sku Standard_ZRS --kind StorageV2 \
--min-tls-version TLS1_2 --allow-blob-public-access false
az storage account show -n stdemo482 -g rg-demo --query "{sku:sku.name, tier:accessTier}"
az storage account update -n stdemo482 -g rg-demo --sku Standard_GZRS
powershell
New-AzStorageAccount -ResourceGroupName rg-demo -Name stdemo482 -Location centralindia -SkuName Standard_ZRS -Kind StorageV2 -MinimumTlsVersion TLS1_2 -AllowBlobPublicAccess $false
Containers and Blobs
bash
az storage container create --account-name stdemo482 -n images --auth-mode login
az storage blob upload --account-name stdemo482 -c images -n logo.png -f logo.png --auth-mode login
az storage blob list --account-name stdemo482 -c images -o table --auth-mode login
az storage blob download --account-name stdemo482 -c images -n logo.png -f copy.png --auth-mode logi
| Blob type | Use |
|---|---|
| Block blob | Files, documents, media (most common) |
| Append blob | Logs |
| Page blob | VM disks (random read/write) |
Access Tiers
| Tier | Use | Minimum days |
|---|---|---|
| Hot | Frequent access | none |
| Cool | Infrequent | 30 |
| Cold | Rare | 90 |
| Archive | Offline, rehydrate before reading | 180 |
bash
az storage blob set-tier --account-name stdemo482 -c images -n old.zip --tier Archive --auth-mode logi
Lifecycle Management
json
{"rules":[{"name":"age","enabled":true,"type":"Lifecycle","definition":{
"filters":{"blobTypes":["blockBlob"],"prefixMatch":["logs/"]},
"actions":{"baseBlob":{"tierToCool":{"daysAfterModificationGreaterThan":30},
"tierToArchive":{"daysAfterModificationGreaterThan":180},
"delete":{"daysAfterModificationGreaterThan":730}}}}}]}
bash
az storage account management-policy create --account-name stdemo482 -g rg-demo --policy @policy.jso
Protection Features
- Soft delete for blobs and containers
- Versioning keeps older versions
- Point-in-time restore for block blobs
- Immutable storage (WORM) for compliance
- Object replication copies blobs to another account
Practice
- Create a ZRS storage account with public access off
- Create a container and upload a file
- Change a blob tier to Cool
- Add a lifecycle rule and turn on soft delete
Conclusion
Create a storage account with the right type and redundancy, use containers and blobs, choose access tiers, automate with lifecycle rules and protect data with soft delete and versioning.
Quick Summary: services; settings; redundancy; containers; tiers; lifecycle; protection.

