Skip to content

Storage

First PublishedByAtif Alam

Azure storage is organized under Storage Accounts — a top-level resource that provides a namespace for all Azure Storage services.

A storage account gives you access to four storage services:

ServiceTypeAzureAWS Equivalent
Blob StorageObject storageContainers + blobsS3
Azure FilesFile shares (SMB/NFS)File sharesEFS
Queue StorageMessage queuesQueuesSQS (basic)
Table StorageNoSQL key-valueTablesDynamoDB (basic)
Terminal window
az storage account create \
--name mystorageacct \
--resource-group myapp-rg \
--location eastus \
--sku Standard_LRS \
--kind StorageV2 \
--min-tls-version TLS1_2
SKURedundancyDurabilityUse Case
LRS3 copies in one data center11 ninesDev/test, non-critical data
ZRS3 copies across 3 AZs12 ninesProduction, high availability
GRSLRS + async copy to paired region16 ninesDisaster recovery
GZRSZRS + async copy to paired region16 ninesBest durability + HA
RA-GRSGRS + read access in secondary region16 ninesDR with read failover
RA-GZRSGZRS + read access in secondary16 ninesMaximum durability + HA + read DR

Blob (Binary Large Object) storage is Azure’s object storage — equivalent to AWS S3.

Storage Account: mystorageacct
└── Container: images (like an S3 bucket)
├── logo.png (block blob)
├── photos/vacation.jpg (block blob)
└── backup.tar.gz (block blob)
└── Container: logs
└── 2026/02/17/app.log
ConceptWhat It Is
ContainerA grouping of blobs (like an S3 bucket). Flat namespace — the / in paths is just naming convention.
BlobA file (object). Up to 190.7 TiB for block blobs.
Block blobStandard blob type — optimized for uploading large files. Most common.
Append blobOptimized for append operations (log files).
Page blobRandom read/write (used by Azure Disk under the hood).
Terminal window
# Create a container
az storage container create --name images --account-name mystorageacct
# Upload a file
az storage blob upload \
--account-name mystorageacct \
--container-name images \
--name logo.png \
--file ./logo.png
# List blobs
az storage blob list --account-name mystorageacct --container-name images --output table
# Download
az storage blob download \
--account-name mystorageacct \
--container-name images \
--name logo.png \
--file ./downloaded-logo.png
# Upload a directory (recursive)
az storage blob upload-batch \
--account-name mystorageacct \
--destination images \
--source ./local-images/
from azure.identity import DefaultAzureCredential
from azure.storage.blob import BlobServiceClient
credential = DefaultAzureCredential()
blob_service = BlobServiceClient(
account_url="https://mystorageacct.blob.core.windows.net",
credential=credential
)
# Upload
container = blob_service.get_container_client("images")
with open("logo.png", "rb") as f:
container.upload_blob("logo.png", f, overwrite=True)
# Download
blob = container.download_blob("logo.png")
data = blob.readall()
TierAccessStorage CostAccess CostUse Case
HotFrequentHigherLowerActive data, frequently accessed
CoolInfrequent (30+ days)LowerHigherBackups, older data
ColdRare (90+ days)Even lowerEven higherLong-term backup
ArchiveVery rare (180+ days)LowestHighest + rehydrate timeCompliance, deep archive

Set the tier per blob or as the default for the storage account:

Terminal window
# Set blob tier
az storage blob set-tier \
--account-name mystorageacct \
--container-name images \
--name old-photo.jpg \
--tier Cool

Automatically transition blobs between tiers or delete them:

{
"rules": [{
"name": "archiveOldLogs",
"enabled": true,
"type": "Lifecycle",
"definition": {
"filters": {
"blobTypes": ["blockBlob"],
"prefixMatch": ["logs/"]
},
"actions": {
"baseBlob": {
"tierToCool": {"daysAfterModificationGreaterThan": 30},
"tierToArchive": {"daysAfterModificationGreaterThan": 90},
"delete": {"daysAfterModificationGreaterThan": 365}
}
}
}
}]
}
FeatureWhat It Does
VersioningKeeps previous versions of blobs automatically. Restore any version.
Soft deleteDeleted blobs are retained for a configurable period (1–365 days).
Change feedLog of all blob changes (create, update, delete). Useful for auditing and event-driven processing.
MethodWhen to Use
Azure RBAC (recommended)Assign roles like “Storage Blob Data Reader” to users/managed identities
Shared Access Signatures (SAS)Time-limited, scoped access tokens for external users/services
Access keysFull access to the entire storage account (avoid — too broad)
Anonymous/public accessStatic websites only — disable by default
Terminal window
# Generate a SAS token (read-only, 1 hour)
az storage blob generate-sas \
--account-name mystorageacct \
--container-name images \
--name logo.png \
--permissions r \
--expiry $(date -u -d '+1 hour' +%Y-%m-%dT%H:%MZ) \
--output tsv
Terminal window
# Enable static website
az storage blob service-properties update \
--account-name mystorageacct \
--static-website \
--index-document index.html \
--404-document 404.html
# Upload site files
az storage blob upload-batch \
--account-name mystorageacct \
--destination '$web' \
--source ./dist/

Access at: https://mystorageacct.z13.web.core.windows.net

Put Azure CDN or Front Door in front for custom domain + HTTPS.

Managed Disks are block storage volumes for VMs — equivalent to AWS EBS.

TypePerformanceUse Case
Standard HDDLow (up to 500 IOPS)Dev/test, backups
Standard SSDModerate (up to 6,000 IOPS)Web servers, light production
Premium SSDHigh (up to 20,000 IOPS)Production databases, high I/O
Premium SSD v2Flexible IOPS/throughputLatency-sensitive, large databases
Ultra DiskExtreme (up to 160,000 IOPS)SAP HANA, top-tier databases
FeatureDetail
SnapshotsPoint-in-time copy. Can create a new disk from a snapshot.
EncryptionServer-side encryption (SSE) with platform-managed or customer-managed keys.
Shared disksAttach one disk to multiple VMs (for clustered workloads).
BurstingStandard and Premium SSDs can burst beyond baseline IOPS.

Azure Files provides managed file shares accessible via SMB and NFS — equivalent to AWS EFS.

  • Lift and shift — Apps that use shared file systems (config files, shared data).
  • Container storage — Shared volume for AKS pods or ACI containers.
  • Cross-platform — SMB for Windows, NFS for Linux.
  • Azure File Sync — Sync on-premises file servers with Azure Files (hybrid).
Terminal window
# Create a file share
az storage share-rm create \
--storage-account mystorageacct \
--name myshare \
--quota 100 # GB
# Mount on Linux
sudo mount -t cifs //mystorageacct.file.core.windows.net/myshare /mnt/myshare \
-o vers=3.0,username=mystorageacct,password=<storage-key>,dir_mode=0777,file_mode=0777
TierUse Case
PremiumLow latency, high IOPS (SSD-backed)
Transaction optimizedHeavy transaction workloads (HDD-backed)
HotGeneral purpose file shares
CoolInfrequently accessed (cost-optimized)
QuestionAnswer
Storing files/objects via HTTP API?Blob Storage
Need a disk for a VM?Managed Disks
Need shared file system (SMB/NFS)?Azure Files
Long-term archive (compliance)?Blob Storage (Archive tier)
Static website?Blob Storage (static website)
Container shared storage (AKS)?Azure Files or Azure Disk
  • Blob Storage is Azure’s object storage. Use access tiers (Hot/Cool/Cold/Archive) and lifecycle policies to optimize costs.
  • Managed Disks are block storage for VMs. Premium SSD for production databases; Standard SSD for web servers.
  • Azure Files provides shared file systems via SMB/NFS — use for lift-and-shift and container shared storage.
  • Everything lives under a Storage Account — choose the right redundancy (LRS for dev, ZRS/GRS for production).
  • Use RBAC and managed identities for access. Use SAS tokens for time-limited external access. Avoid access keys.