Lab 1: Create a Resource Group, Storage Account and Upload a File With the Portal and CLI
Goal
Create a resource group and a storage account, upload a file, change its tier and then delete everything.
Step 1: Open Cloud Shell
- Sign in to the Azure portal
- Click the Cloud Shell icon at the top and choose Bash
Step 2: Create the Resource Group
bash
az group create --name rg-lab1 --location centralindia
az group show --name rg-lab1 -o table
Step 3: Create the Storage Account
The name must be 3 to 24 lowercase letters and numbers and globally unique. Add numbers of your own.
bash
az storage account create \
--name stlab1demo12345 \
--resource-group rg-lab1 \
--location centralindia \
--sku Standard_LRS \
--kind StorageV2
Step 4: Create a Container and Upload a File
bash
echo "Hello Azure" > hello.txt
az storage container create --account-name stlab1demo12345 --name docs --auth-mode login
az storage blob upload --account-name stlab1demo12345 --container-name docs --name hello.txt --file hello.txt --auth-mode login
az storage blob list --account-name stlab1demo12345 --container-name docs --auth-mode login -o table
If upload says not authorized Your account needs the Storage Blob Data Contributor role on the storage account. Assign it in Access control (IAM) and wait a minute.
Step 5: Change the Tier
bash
az storage blob set-tier --account-name stlab1demo12345 --container-name docs --name hello.txt --tier Cool --auth-mode logi
Step 6: See It in the Portal
- Search Storage accounts, open your account
- Go to Containers, then
docs - Click
hello.txtand check the Access tier
Step 7: Clean Up
bash
az group delete --name rg-lab1 --yes --no-wait
Done You created, used and removed storage. Always delete lab groups.
Questions
- Why did the storage name need to be unique?
- What did
--sku Standard_LRSchoose? - What happens to the file when the group is deleted?
Conclusion
You created a resource group and storage account, uploaded a blob, changed its tier and cleaned up.
Quick Summary: group; storage; upload; tier; portal check; cleanup.

