Complete Azure Blob Storage guide covering architecture, tiers, security, pricing, and lifecycle management
Azure Blob Storage Explained:
Complete Beginner-to-Advanced Guide
Azure Blob Storage is where Azure applications put everything that is not a database row: images, videos, logs, backups, ML datasets, and application binaries. It is also where most Azure engineers leave money on the table — storing cold data at hot prices, skipping lifecycle automation, and leaving public access open by default. This guide covers everything from first container to production-grade security, cost optimization, and architecture patterns.
What Is Azure Blob Storage? Core Concepts Explained
Azure Blob Storage is Microsoft's object storage service — a massively scalable repository for unstructured data that does not fit the row-and-column model of a relational database. "Blob" stands for Binary Large Object, and that is exactly what it holds: raw bytes of any type and size, addressed by a name rather than by schema. A JPEG image, a 10 TB video file, a compressed log archive, a Parquet dataset, a VM backup, and a trained machine learning model are all, from Azure Blob Storage's perspective, the same thing: a named sequence of bytes in a container.
The three-level hierarchy of Azure Blob Storage is Storage Account → Container → Blob. A storage account is the top-level Azure resource that provides a unique namespace for all your storage data — every blob's URL includes the storage account name. Inside a storage account, containers act like directories or S3 buckets — grouping blobs logically and holding access policies. Blobs are the actual objects stored inside containers.
Every blob is reachable via a predictable HTTPS endpoint: https://<account>.blob.core.windows.net/<container>/<blob>. This flat REST API is what makes Blob Storage cloud-native — any application that can make an HTTPS request can read or write blobs, without special drivers or protocols.
Block Blobs, Append Blobs, and Page Blobs — When to Use Each
Azure Blob Storage has three distinct blob types. Each is optimized for a different access pattern. You choose the type when the blob is created and cannot change it afterwards.
Block Blobs
Block blobs are the standard type for almost everything. A block blob is composed of up to 50,000 blocks, each up to 4,000 MiB, giving a maximum blob size of approximately 190.7 TiB. When you upload a large file, the Azure SDK splits it into blocks, uploads them in parallel, and then commits the block list — enabling high-throughput uploads with automatic retry of individual failed blocks. Block blobs support all four access tiers (Hot, Cool, Cold, Archive) and all lifecycle management features. Use block blobs for images, videos, documents, backups, datasets, and application binaries.
Append Blobs
Append blobs are optimized for write-once, read-later streaming data. You can only add data to the end of an append blob — you cannot modify or overwrite data already written. This makes them ideal for log files, audit trails, and diagnostic data where data is continuously appended. Append blobs do not support tiering to Archive or most lifecycle management features beyond deletion. Use append blobs for application logs, Azure Diagnostics output, and time-series data streams.
Page Blobs
Page blobs are optimized for random read/write operations. A page blob is divided into 512-byte pages. You can write to any specific page range without affecting other pages. Page blobs underpin Azure Virtual Machine OS and data disks (VHD/VHDX files) and Azure SQL Database data files. Unless you are implementing custom disk or database storage, you almost certainly do not need to work with page blobs directly — use block blobs instead.
Storage Account Types and Hierarchy
The storage account type determines which features are available and which blob types are supported. In 2026, General Purpose v2 (GPv2) is the correct choice for virtually every new deployment — it supports all blob types, all access tiers, all redundancy options, and all Azure Storage features at the most competitive pricing. The only reason to choose a different type is a very specific performance or compatibility requirement.
| Account Type | Supports | Tiers Available | When to Choose |
|---|---|---|---|
| General Purpose v2 (GPv2) | Block, Append, Page Blobs + Azure Files, Queues, Tables | Hot, Cool, Cold, Archive | Default for all new storage accounts. All features, best pricing for most workloads. |
| Premium Block Blob | Block Blobs only | No tiering supported | Latency-sensitive workloads needing consistent sub-10ms response. Higher storage cost, lower transaction cost. Cannot use lifecycle tiering. |
| Premium Page Blob | Page Blobs only | No tiering | High-performance VM disk storage. Used internally by Azure Managed Disks. |
| Premium File Share | Azure Files only | N/A | High-IOPS SMB file shares. Not for blob workloads. |
| General Purpose v1 (GPv1) | Legacy — same as GPv2 but without Cool/Archive tiers | Hot only | Not recommended. Upgrade existing GPv1 accounts to GPv2 in-place with no downtime. |
Step-by-Step: Create a Storage Account and Upload Your First Blob
The following procedure creates a GPv2 storage account with secure defaults — public blob access disabled, TLS 1.2 minimum, and Zone-Redundant Storage — then creates a container and uploads a blob. All steps work in Azure Cloud Shell or any terminal with the Azure CLI installed.
Set Variables and Create a Resource Group
Define your variables once and reference them throughout. All names must be globally unique — the storage account name becomes part of the public DNS entry for your blobs.
Create the Storage Account with Secure Defaults
Create a GPv2 account with ZRS redundancy, public blob access disabled, and minimum TLS version enforced. These three settings should be defaults for every production storage account.
Create a Container Inside the Storage Account
Containers are the top-level grouping inside a storage account. Set access level to Private — blobs are not publicly accessible by default, which is correct for most workloads. Public access requires an explicit container-level setting.
Upload a Blob to the Container
Upload a local file to the container using Entra ID (Azure AD) authentication — not the storage account key. The --auth-mode login flag uses your current Azure CLI login credentials, not a key.
List Blobs and Verify the Upload
Confirm the blob was uploaded, verify its properties, and retrieve the full URL for sharing or application configuration.
RG="rg-storage-prod"
LOCATION="eastus"
SA="stprod$(date +%s | tail -c 6)" # Unique name with timestamp suffix
CONTAINER="app-data"
# Create resource group
az group create --name $RG --location $LOCATION
# STEP 2: Create GPv2 storage account with secure defaults
az storage account create \
--name $SA \
--resource-group $RG \
--location $LOCATION \
--sku Standard_ZRS \ # Zone-Redundant Storage
--kind StorageV2 \ # General Purpose v2
--allow-blob-public-access false \ # No anonymous access
--min-tls-version TLS1_2 \ # Enforce TLS 1.2+
--https-only true \ # Block HTTP requests
--access-tier Hot # Default tier (override per blob)
# STEP 3: Create a container
az storage container create \
--name $CONTAINER \
--account-name $SA \
--auth-mode login # Use Entra ID, not storage key
# STEP 4: Upload a blob (replace ./report.pdf with your file)
az storage blob upload \
--account-name $SA \
--container-name $CONTAINER \
--name "reports/monthly-2026-07.pdf" \
--file ./report.pdf \
--auth-mode login
# STEP 5: List blobs and verify
az storage blob list \
--account-name $SA \
--container-name $CONTAINER \
--query "[].{Name:name,Size:properties.contentLength,Tier:properties.blobTier}" \
--auth-mode login -o table
# Get the blob URL
echo "https://$SA.blob.core.windows.net/$CONTAINER/reports/monthly-2026-07.pdf"
Access Tiers: Hot, Cool, Cold, and Archive — Complete Breakdown
Access tiers are the primary cost optimization lever in Azure Blob Storage. Each tier offers a different trade-off between storage cost (lower as you move to cooler tiers) and access cost (higher as you move to cooler tiers). Choosing the wrong tier for your access pattern is the most common cause of unexpectedly high Azure storage bills.
| Tier | Storage Cost (LRS) | Min Retention | Access | 128 KiB min billing? |
|---|---|---|---|---|
| Hot | $0.018/GB/mo | None | Immediate (online) | No |
| Cool | $0.013/GB/mo | 30 days | Immediate (online) | Yes (as of July 2026 new accounts) |
| Cold | $0.004/GB/mo | 90 days | Immediate (online) | Yes |
| Archive | $0.00099/GB/mo | 180 days | Offline — rehydrate first (1–15 hours) | Yes |
For new accounts created after July 2026, the Cool, Cold, and Archive tiers apply a 128 KiB minimum billable object size. A 1 KB log file moved to Cool is billed as 128 KB. For pipelines generating millions of small objects, consolidate them into larger archives (Parquet files, daily zip bundles, tar archives) before moving to cooler tiers. This can reduce storage costs by 10–30× for small-object log pipelines.
Redundancy Options: LRS, ZRS, GRS, RA-GZRS Explained
Redundancy determines how many copies of your data Azure maintains, and how far apart they are geographically. More redundancy means higher durability against hardware failures and regional disasters — at a proportionally higher price. The choice of redundancy is almost always a cost vs. durability decision.
Lifecycle Management: Automate Tier Transitions and Deletions
Lifecycle management policies are the most impactful cost feature in Azure Blob Storage. A policy is a JSON rule set that runs once per day and automatically moves blobs between tiers or deletes them based on conditions you define — last modified date, last accessed date, creation date, or blob name prefix. Once configured, lifecycle policies eliminate the need to manually manage tier placement as data ages.
Organizations that implement lifecycle policies typically see 40–60% storage cost reduction within the first three months as historical data that has been accumulating in Hot tier is automatically moved to appropriate cooler tiers. The policies are free — you only pay the standard Set Blob Tier operation cost when a tier transition occurs.
Lifecycle Policy Design Patterns
The most common pattern is a three-stage cascade: Hot (0–30 days) → Cool (30–90 days) → Archive (90+ days), with deletion at a fixed retention boundary. This matches the natural access pattern of most data: heavily accessed immediately after creation, rarely accessed after 30 days, and only retained for compliance after 90 days.
"rules": [
{
"name": "tier-logs",
"enabled": true,
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"tierToCool": { "daysAfterModificationGreaterThan": 30 },
"tierToCold": { "daysAfterModificationGreaterThan": 90 },
"delete": { "daysAfterModificationGreaterThan": 365 }
}
},
"filters": {
"blobTypes": ["blockBlob"],
"prefixMatch": ["logs/", "diagnostics/"]
}
}
},
{
"name": "archive-backups",
"enabled": true,
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"tierToCool": { "daysAfterModificationGreaterThan": 7 },
"tierToArchive": { "daysAfterModificationGreaterThan": 30 },
"delete": { "daysAfterModificationGreaterThan": 2555 } // 7 years
}
},
"filters": {
"blobTypes": ["blockBlob"],
"prefixMatch": ["backups/"]
}
}
},
{
"name": "delete-old-versions",
"enabled": true,
"type": "Lifecycle",
"definition": {
"actions": {
"version": {
"delete": { "daysAfterCreationGreaterThan": 90 }
}
},
"filters": { "blobTypes": ["blockBlob"] }
}
}
]
}
# Apply the lifecycle policy via Azure CLI
az storage account management-policy create \
--account-name $SA \
--resource-group $RG \
--policy @lifecycle-policy.json
# Enable last-access-time tracking (required for access-time-based policies)
az storage account blob-service-properties update \
--account-name $SA \
--resource-group $RG \
--enable-last-access-tracking true
Policies run once per day — changes do not take effect immediately. A blob moved to Cool today will not immediately have the access-time tracking policy evaluate it.
Archive rehydration cannot be triggered by lifecycle policy — you can only move blobs to cooler tiers via lifecycle policy, not back to warmer tiers. Rehydration must be done via Set Blob Tier API or Copy Blob.
Minimum retention penalties — if a blob in Cool (30-day min) or Cold (90-day min) is deleted or moved to a warmer tier before the minimum period, Azure charges an early deletion fee for the remaining days. Build this into your policy design.
Immutable blobs — lifecycle policy delete actions will not work on blobs in immutable containers (WORM storage). The delete action puts soft-deleted blobs into a soft-delete state rather than permanently removing them.
Security: Access Control, Private Endpoints, and Managed Identity
Azure Blob Storage has three layers of access control. Understanding all three — and which to use in which situation — is the difference between a secure storage implementation and a data breach waiting to happen.
Layer 1: Network Access
By default, a storage account is accessible from any IP address over the public internet. The first security control is network restriction: limit which networks can reach your storage account. For production workloads, use Private Endpoints — a network interface in your VNet that gives the storage account a private IP address visible only within your virtual network. Blobs accessed via private endpoint never traverse the public internet.
Layer 2: Authentication and Authorization (RBAC)
Azure Blob Storage supports two authentication methods: storage account keys (shared keys) and Azure Entra ID (Azure Active Directory) with RBAC role assignments. Always prefer Entra ID authentication in production. Storage account keys are equivalent to root credentials — anyone with a key has full access to everything in the account, with no audit trail of individual operations. Entra ID authentication provides fine-grained RBAC, per-identity audit logs in Azure Monitor, and supports Managed Identity — eliminating the need to store credentials in application configuration entirely.
Layer 3: Container-Level Access Policies
Individual containers can have Shared Access Signatures (SAS tokens) generated for time-limited, scope-limited delegated access. A SAS token grants a specific set of permissions (read, write, delete) on a specific container or blob, expiring at a defined time. Use SAS tokens for temporary external access to specific blobs — not for application-to-blob authentication, where Managed Identity is superior.
az webapp identity assign \
--name my-web-app \
--resource-group rg-prod
# Get the Principal ID of the Managed Identity
PRINCIPAL_ID=$(az webapp identity show \
--name my-web-app \
--resource-group rg-prod \
--query principalId -o tsv)
# Get the Storage Account Resource ID
SA_ID=$(az storage account show \
--name $SA \
--resource-group $RG \
--query id -o tsv)
# Step 2: Assign Storage Blob Data Contributor role to the Managed Identity
az role assignment create \
--assignee $PRINCIPAL_ID \
--role "Storage Blob Data Contributor" \
--scope $SA_ID
# Step 3: Disable storage account key access (optional but recommended for production)
az storage account update \
--name $SA \
--resource-group $RG \
--allow-shared-key-access false
# Step 4: Create a Private Endpoint for the storage account in your VNet
az network private-endpoint create \
--name pe-storage-prod \
--resource-group $RG \
--vnet-name vnet-prod \
--subnet snet-app \
--private-connection-resource-id $SA_ID \
--group-id blob \
--connection-name psc-storage-blob
# Step 5: Restrict storage account to private endpoint only
az storage account update \
--name $SA \
--resource-group $RG \
--default-action Deny \
--bypass None
AzCopy and the REST API — Moving Data at Scale
For moving large volumes of data into or out of Azure Blob Storage — bulk uploads, cross-account copies, migrations — the Azure CLI's blob commands are functional but not optimized for throughput. AzCopy is the purpose-built data transfer tool that parallelizes transfers automatically, resumes interrupted uploads, and achieves near-network-speed throughput for large transfers.
AzCopy Essentials
AzCopy is a standalone executable — no installation required beyond downloading the binary. It supports authentication via Entra ID (preferred) and SAS tokens. The most important commands for production use:
azcopy login
# Upload a single file
azcopy copy "./report.pdf" \
"https://$SA.blob.core.windows.net/app-data/reports/report.pdf"
# Upload an entire folder recursively
azcopy copy "./data-export/" \
"https://$SA.blob.core.windows.net/app-data/exports/" \
--recursive=true
# Download a container to local directory
azcopy copy \
"https://$SA.blob.core.windows.net/app-data/" \
"./local-download/" \
--recursive=true
# Copy between storage accounts (server-side, no bandwidth consumed locally)
azcopy copy \
"https://$SA_SOURCE.blob.core.windows.net/source-container/" \
"https://$SA_DEST.blob.core.windows.net/dest-container/" \
--recursive=true
# Sync (copy only changed/new files)
azcopy sync \
"./local-data/" \
"https://$SA.blob.core.windows.net/app-data/" \
--recursive=true \
--delete-destination=false # Keep blobs not in source
# Upload with explicit blob tier (set to Cool on upload)
azcopy copy "./archive-data.zip" \
"https://$SA.blob.core.windows.net/backups/archive-data.zip" \
--block-blob-tier=Cool
# List active jobs (useful for monitoring large transfers)
azcopy jobs list
# Resume a failed/interrupted transfer by job ID
azcopy jobs resume <job-id>
Architecture Patterns: Blob Storage in Real-World Azure Solutions
Azure Blob Storage is rarely used in isolation — it is the storage layer that appears in nearly every Azure architecture. Understanding the standard integration patterns prevents common design mistakes.
Pattern 1: Static Web Content Serving
Enable the Static Website feature on a storage account to serve HTML, CSS, and JavaScript directly from Blob Storage via the $web container — with a public endpoint, no App Service required. Pair with Azure CDN or Azure Front Door for global edge caching and custom domain support with HTTPS. Best for single-page applications, documentation sites, and marketing pages that don't require server-side rendering.
Pattern 2: Event-Driven Processing with Azure Functions
Blob Storage integrates natively with Azure Functions via the Blob Trigger — a Function fires automatically when a new blob is created in a container. This enables serverless processing pipelines: a document uploaded to the input container triggers a Function that processes it (resizes an image, extracts text, runs inference, validates format) and writes the result to an output container. No polling, no queue management, no server to manage.
Pattern 3: Data Lake with ADLS Gen2
When you create a Blob Storage account with --enable-hierarchical-namespace true, you create an Azure Data Lake Storage Gen2 account. ADLS Gen2 adds a true hierarchical directory structure to flat object storage, enabling efficient directory-level operations that Blob Storage cannot perform natively. Renaming a directory with 100,000 files requires 100,000 API calls in plain Blob Storage — it is one atomic operation in ADLS Gen2. Used by Azure Synapse Analytics, Azure Databricks, and Microsoft Fabric as the standard data lake storage layer.
Pattern 4: Application Backup and Disaster Recovery
GRS or RA-GZRS storage accounts provide automatic cross-region replication for disaster recovery. App Service backups, Azure SQL Database long-term retention, and VM disk snapshots all write to Blob Storage. Use lifecycle policies to automatically archive backups older than 30 days and delete backups older than the retention requirement — preventing backup storage from becoming an unbounded cost center.
Cost Optimization: The 8 Rules That Keep Blob Storage Bills Predictable
Azure Blob Storage bills are more complex than a per-GB rate suggests. The actual bill is the sum of storage costs (per GB at tier rate), transaction costs (per PUT, GET, LIST, COPY operation), retrieval costs (for Cool, Cold, Archive tiers), early deletion penalties (for data deleted before minimum retention period), and egress costs (data transferred out of Azure or between regions). Understanding each component prevents "bill shock" surprises.
The 8 Cost Optimization Rules
Frequently Asked Questions
Related FAVRITE Articles
- ADLS Gen2 vs Blob Storage: Choosing the Right Storage for AI Workloads
- Stop Using Connection Strings: A Step-by-Step Guide to Azure Managed Identities in 2026
- Top 100 Azure CLI Commands Every Cloud Engineer Should Know
- How to Secure Azure Resources Using Microsoft Defender for Cloud