
Cloud
Learning Level
Azure Blob Storage is a service for storing large amounts of unstructured data like documents, images, and videos.
By the end of this lesson, you'll understand:
# Create storage account
az storage account create \
--name mystorageaccount \
--resource-group myResourceGroup \
--location eastus \
--sku Standard_LRS
# Create container
az storage container create \
--account-name mystorageaccount \
--name mycontainer# Upload file
az storage blob upload \
--account-name mystorageaccount \
--container-name mycontainer \
--name myfile.txt \
--file ./myfile.txt
# Download file
az storage blob download \
--account-name mystorageaccount \
--container-name mycontainer \
--name myfile.txt \
--file downloaded.txt# Generate SAS token
az storage blob generate-sas \
--account-name mystorageaccount \
--container-name mycontainer \
--name myfile.txt \
--permissions r \
--expiry 2024-12-31
# Get blob URL
az storage blob url \
--account-name mystorageaccount \
--container-name mycontainer \
--name myfile.txt# Create lifecycle policy
az storage account management-policy create \
--account-name mystorageaccount \
--resource-group myResourceGroup \
--policy @lifecycle.jsonlifecycle.json:
{
"rules": [
{
"name": "archive-old-blobs",
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"tierToArchive": {
"daysAfterModificationGreaterThan": 90
},
"delete": {
"daysAfterModificationGreaterThan": 365
}
}
},
"filters": {
"blobTypes": ["blockBlob"]
}
}
}
]
}Learn about Azure SQL Database for relational data, or explore Cosmos DB for NoSQL.
Resources
Ojasa Mirai
Master AI-powered development skills through structured learning, real projects, and verified credentials. Whether you're upskilling your team or launching your career, we deliver the skills companies actually need.
Learn Deep • Build Real • Verify Skills • Launch Forward