Skip to content

Azure Storage Labs โ€‹

๐ŸŽฏ Purpose: Hands-on practice using Azure Portal
Format: Each lab has a scenario, clear steps, and discovery questions
Solutions: See solutions.md - fill in as you complete!


๐Ÿ—๏ธ Setup: Create Your Lab Environment โ€‹

Before starting, create these resources:

ResourceNameSettings
Resource Grouprg-storage-labsYour preferred region
Storage Account 1labstandard[initials][random]Standard, LRS
Storage Account 2labdatalake[initials][random]Standard, LRS, Enable HNS

Lab 1: The Namespace Difference โ€‹

๐ŸŽฏ Goal: Experience the difference between flat and hierarchical namespace firsthand.

Scenario โ€‹

You need to organize project files. Let's see how folder operations differ between regular blob storage and Data Lake.

Part A: Flat Namespace (Standard Blob) โ€‹

In your labstandard storage account:

StepWhat to DoWhat to Look For
1Go to Containers โ†’ Create container project-filesContainer created
2Click into container โ†’ + Add DirectoryNotice: "New virtual directory" text
3Create folder structure: 2024/january/reports/Creates nested "folders"
4Upload 3 small files into 2024/january/reports/Files uploaded
5Go back to container root โ†’ Look at blob namesDiscovery: What are the actual blob names?
6Try to rename folder january to janDiscovery: Can you do it? What happens?
7Delete the folder 2024Discovery: What actually gets deleted?

Part B: Hierarchical Namespace (Data Lake) โ€‹

In your labdatalake storage account:

StepWhat to DoWhat to Look For
1Go to Containers โ†’ Create container project-filesContainer created
2Click + Add DirectoryNotice: No "virtual" - it's a real directory!
3Create same structure: 2024/january/reports/Creates nested directories
4Upload 3 small files into 2024/january/reports/Files uploaded
5Right-click folder january โ†’ RenameDiscovery: Can you rename? How fast?
6Right-click folder 2024 โ†’ MoveDiscovery: Is Move available?
7Delete folder with files insideDiscovery: How is this different?

Questions to Answer โ€‹

Q1: In flat namespace, what is the actual name of a file at 2024/january/reports/file.txt?
โ†’ 

Q2: Why can't you rename a folder in flat namespace?
โ†’ 

Q3: In hierarchical namespace, how long did rename take? Why?
โ†’ 

Q4: What does "virtual directory" mean?
โ†’

Lab 2: Access Tier Deep Dive โ€‹

๐ŸŽฏ Goal: Understand tier behavior, costs, and archive rehydration.

Scenario โ€‹

You're managing a company's document archive. Different documents need different tiers based on access patterns.

Part A: Set Tiers on Upload โ€‹

In your labstandard storage account:

StepWhat to DoWhat to Look For
1Create container tier-testingPrivate access level
2Click UploadNotice the Access tier dropdown
3Upload active-doc.txt โ†’ Set tier: HotNote: Default tier matches account default
4Upload monthly-report.txt โ†’ Set tier: CoolNotice: Same upload dialog, different tier
5Upload quarterly-data.txt โ†’ Set tier: ColdCold tier option available
6Upload archive-backup.txt โ†’ Set tier: ArchiveArchive tier selected

Part B: View and Change Tiers โ€‹

StepWhat to DoWhat to Look For
1Click on any blob โ†’ Overview tabFind "Access tier" property
2Click Change tier buttonSee all available tier options
3Change active-doc.txt from Hot to CoolDiscovery: Is it instant?
4Try to change archive-backup.txt to HotDiscovery: What's different about Archive?
5Look for "Archive status" propertyDiscovery: What does "rehydrate-pending-to-hot" mean?
6Find "Rehydrate priority" optionStandard vs High priority

Part C: Try to Read Archived Blob โ€‹

StepWhat to DoWhat to Look For
1Click on archive-backup.txtGo to blob properties
2Click DownloadDiscovery: What happens?
3Generate a SAS URL for this blobGet the full URL
4Open URL in browserDiscovery: What error do you get?

Part D: Start Rehydration โ€‹

StepWhat to DoWhat to Look For
1Select archive-backup.txt โ†’ Change tierOptions appear
2Select Hot tierRehydrate priority option appears
3Choose Standard priorityNote the time estimate
4Click SaveTier change initiated
5Refresh and check "Archive status"Shows: rehydrate-pending-to-hot

Questions to Answer โ€‹

Q1: Can you set tier during upload? Where is the option?
โ†’ 

Q2: What happens when you try to download an archived blob?
โ†’ 

Q3: What's the difference between Standard and High rehydration priority?
โ†’ 

Q4: While rehydration is pending, what is shown in the "Access tier" field?
โ†’ 

Q5: Can you cancel a rehydration in progress?
โ†’

Lab 3: Container Access Levels & Anonymous Access โ€‹

๐ŸŽฏ Goal: Understand the three access levels and security implications.

Scenario โ€‹

You need to host some public images and some private documents in the same storage account.

Setup โ€‹

StepWhat to Do
1Create container private-docs with Private access
2Create container public-images with Blob access
3Create container full-public with Container access
4Upload the same test image to all three containers

Testing Access โ€‹

StepWhat to DoWhat to Look For
1Get URL of blob in private-docsClick blob โ†’ Copy URL
2Open URL in Incognito browserExpected: Error (no access)
3Get URL of blob in public-imagesSame process
4Open URL in Incognito browserExpected: Image displays
5Try to list blobs by removing filename from URLExample: https://account.blob.../public-images/
6Expected: Should fail (blob access โ‰  list access)
7Try same list URL for full-public containerExpected: XML list of blobs

Find the Security Warning โ€‹

StepWhat to DoWhat to Look For
1Go to storage account โ†’ ConfigurationLook for anonymous access setting
2Find "Allow Blob anonymous access"What is current setting?
3Go to container โ†’ Change access levelNotice the warning banner

Questions to Answer โ€‹

Q1: What's the URL format for accessing a blob anonymously?
โ†’ 

Q2: What's the difference between "Blob" and "Container" access level?
โ†’ 

Q3: Where do you see the warning about anonymous access being a security risk?
โ†’ 

Q4: If you disable "Allow Blob anonymous access" at account level, what happens to public containers?
โ†’

Lab 4: Moving and Copying Blobs โ€‹

๐ŸŽฏ Goal: Understand what operations are possible and their limitations.

Scenario โ€‹

You need to reorganize blobs between containers and understand the copy/move behavior.

Part A: Copy Within Same Account โ€‹

StepWhat to DoWhat to Look For
1In tier-testing container, select a blobCheckbox appears
2Look for Copy option in toolbarFind the copy button
3Click CopyNotice: Copies to clipboard
4Navigate to different containerOpen private-docs
5Click PasteDiscovery: Is paste available?
6Try right-click on blob โ†’ Look for MoveDiscovery: Is Move available?

Part B: Copy Using "Copy URL" + Portal Upload โ€‹

StepWhat to DoWhat to Look For
1Go to a blob โ†’ Copy its URLFull blob URL
2Go to destination containerDifferent container
3Click Upload โ†’ AdvancedExpand advanced options
4Find "Copy from URL" sectionPaste source URL
5Discovery: Does this work?Try it!

Part C: Rename a Blob (Flat Namespace) โ€‹

StepWhat to DoWhat to Look For
1Right-click a blobLook for Rename option
2Discovery: Is there a Rename option?No direct rename!
3How would you "rename" a blob?Think about it...

Part D: Move in Data Lake (Hierarchical Namespace) โ€‹

In your labdatalake storage account:

StepWhat to DoWhat to Look For
1Create two containers: source and destinationBoth created
2In source, create folder data with filesAdd 3+ files
3Right-click on a file โ†’ Look for optionsWhat's available?
4Find Move optionSelect it
5Move file to destination containerDiscovery: Does it work across containers?
6Move file within same container to different folderDiscovery: Does this work?

Questions to Answer โ€‹

Q1: Can you move a blob in standard (flat namespace) storage? What must you do instead?
โ†’ 

Q2: Can you rename a container? What must you do instead?
โ†’ 

Q3: In Data Lake (HNS), can you move files across containers?
โ†’ 

Q4: What's the difference between Copy and Move in terms of billing?
โ†’

Lab 5: Lifecycle Management Rules โ€‹

๐ŸŽฏ Goal: Create automatic tier transitions and deletion rules.

Scenario โ€‹

You need to automatically:

  • Move blobs to Cool after 30 days
  • Move blobs to Archive after 90 days
  • Delete blobs after 365 days

Create Lifecycle Policy โ€‹

StepWhat to DoWhat to Look For
1Storage account โ†’ Data management โ†’ Lifecycle managementLifecycle blade
2Click + Add ruleRule wizard opens
3Name: auto-tier-transitionGive descriptive name
4Rule scope: Apply to all blobs or Limit with filtersOptions available
5Blob type: Block blobs (default)Other types available
6Blob subtype: Base blobsNotice versions/snapshots options

Configure Actions โ€‹

StepWhat to DoWhat to Look For
1"Base blobs" tab โ†’ Add actionAction dropdown
2Check: Move to cool storageDays input appears
3Set: 30 days after last modificationFirst transition
4Add another action: Move to archive storageCan't select (need higher number)
5Set: 90 daysSecond transition
6Add: Delete the blob after 365 daysFinal action

Add Filter (Optional) โ€‹

StepWhat to DoWhat to Look For
1Go to Filter set tabFilter options
2Add prefix filter: logs/Only affects blobs starting with logs/
3Save the ruleRule created

View as JSON โ€‹

StepWhat to DoWhat to Look For
1Click on Code view tabJSON representation
2Copy the JSONThis is what API uses
3Notice the structureRules, filters, actions

Questions to Answer โ€‹

Q1: How often do lifecycle rules run?
โ†’ 

Q2: Can you create a rule that moves blobs based on LAST ACCESS time (not modification)?
โ†’ 

Q3: What happens if a blob is already in Archive and the delete rule triggers?
โ†’ 

Q4: Can lifecycle rules move blobs to a different container? Different storage account?
โ†’ 

Q5: Why can't you set "Move to Cool after 90 days" if you already have "Move to Archive after 30 days"?
โ†’

Lab 6: Versioning vs Soft Delete vs Point-in-Time โ€‹

๐ŸŽฏ Goal: Understand the three protection mechanisms and when each applies.

Scenario โ€‹

Compare what happens when you delete and modify blobs with different protection enabled.

Part A: Enable Protection Features โ€‹

StepWhat to DoWhere
1Storage account โ†’ Data protectionData management section
2Enable Soft delete for blobs โ†’ 7 daysCheckbox + days
3Enable Soft delete for containers โ†’ 7 daysCheckbox + days
4Enable Versioning for blobsCheckbox
5Point-in-time restore - Try to enableDiscovery: What happens?
6Save changesWait for propagation

Part B: Test Soft Delete โ€‹

StepWhat to DoWhat to Look For
1Upload blob delete-test.txtFile uploaded
2Delete the blobBlob disappears from list
3Toggle Show deleted blobsFilter option in toolbar
4Find your deleted blobShows with "Deleted" status
5Click blob โ†’ UndeleteBlob restored!

Part C: Test Versioning โ€‹

StepWhat to DoWhat to Look For
1Upload blob version-test.txt with content "Version 1"Initial upload
2Upload SAME blob name with content "Version 2"Overwrites
3Upload SAME blob name with content "Version 3"Overwrites again
4Click on the blob โ†’ Versions tabAll versions listed
5Click on old version โ†’ Make current versionOld version promoted
6Download current versionShould have old content

Part D: Check HNS Account โ€‹

StepWhat to DoWhat to Look For
1Go to labdatalake storage accountHNS enabled account
2Go to Data protectionSame blade
3Look for Versioning optionDiscovery: Is it available?
4Look for Point-in-time restoreDiscovery: Is it available?

Questions to Answer โ€‹

Q1: What's the difference between soft delete and versioning?
โ†’ 

Q2: Can you have both soft delete AND versioning enabled?
โ†’ 

Q3: Why is versioning NOT available when HNS is enabled?
โ†’ 

Q4: If you delete a blob with versioning enabled, what happens to the versions?
โ†’ 

Q5: How is Point-in-time restore different from versioning?
โ†’

Lab 7: Static Website Hosting โ€‹

๐ŸŽฏ Goal: Enable and test static website hosting.

Setup Static Website โ€‹

StepWhat to DoWhat to Look For
1Storage account โ†’ Data management โ†’ Static websiteStatic website blade
2Toggle EnabledAdditional fields appear
3Index document: index.htmlDefault page
4Error document: 404.htmlError page
5Click SaveEndpoints appear!
6Copy Primary endpoint URLYour website URL

Find the $web Container โ€‹

StepWhat to DoWhat to Look For
1Go to ContainersList of containers
2Find $web containerSpecial container created
3Note the access levelWhat is it?

Upload Website Content โ€‹

StepWhat to DoContent
1Create index.html locally<h1>Hello from Azure Storage!</h1>
2Create 404.html locally<h1>Page Not Found</h1>
3Upload both to $web containerVia portal upload

Test Your Website โ€‹

StepWhat to DoWhat to Look For
1Open Primary endpoint in browserYour index.html
2Add /nonexistent to URL404.html should show
3Note the URL formathttps://account.z13.web.core.windows.net

Questions to Answer โ€‹

Q1: What's special about the $web container?
โ†’ 

Q2: Can you change the access level of $web container?
โ†’ 

Q3: Is the static website endpoint the same as the blob endpoint?
โ†’ 

Q4: Can static website hosting work with HNS enabled?
โ†’

Lab 8: Azure Files - Create and Mount โ€‹

๐ŸŽฏ Goal: Create a file share and mount it on your computer.

Create File Share โ€‹

StepWhat to DoWhat to Look For
1Storage account โ†’ File sharesFile shares blade
2Click + File shareCreate dialog
3Name: shared-docs
4Tier: Transaction optimizedTier options
5Create the shareShare created

Explore the Share โ€‹

StepWhat to DoWhat to Look For
1Click into shared-docsShare contents
2Click + Add directoryCreate folder
3Create finance folder
4Upload a file to finance
5Note: Files have full paths like a file systemNot like blob "virtual folders"

Get Mount Command โ€‹

StepWhat to DoWhat to Look For
1Click Connect buttonConnect dialog
2Select your OS: WindowsMount script
3Copy the PowerShell scriptFull mount command
4Note the drive letter optionCan choose letter
5Note the authenticationUses storage key

Mount on Windows (if possible) โ€‹

StepWhat to DoWhat to Look For
1Open PowerShell as AdminElevated prompt
2Paste the mount scriptExecute
3Open File ExplorerNew drive should appear
4Create a file from Windows
5Refresh portalFile appears!

Questions to Answer โ€‹

Q1: What's the UNC path format for Azure Files?
โ†’ 

Q2: What port does SMB use? Why might this be blocked?
โ†’ 

Q3: Can you create a file share with NFS protocol? What are the requirements?
โ†’ 

Q4: What authentication methods are shown in the Connect dialog?
โ†’

Lab 9: SAS Tokens - Generation and Testing โ€‹

๐ŸŽฏ Goal: Generate and test different types of SAS tokens.

Generate Blob SAS โ€‹

StepWhat to DoWhat to Look For
1Go to any blob in private-docsClick on blob
2Click Generate SAS tabSAS options
3Signing key: Key 1Which key signs the SAS
4Permissions: Read onlyUncheck all except Read
5Start: Now
6Expiry: 1 hour from nowShort validity
7Allowed protocols: HTTPS onlySecurity option
8Generate SAS token and URLToken appears
9Copy the full Blob SAS URLComplete URL

Test the SAS โ€‹

StepWhat to DoWhat to Look For
1Open SAS URL in Incognito browserShould download/display
2Compare: Open blob URL WITHOUT SASShould fail
3Wait for SAS to expireAfter 1 hour
4Try SAS URL againShould fail - expired

Generate Container SAS (with List permission) โ€‹

StepWhat to DoWhat to Look For
1Go to container level (not blob)Container overview
2Click Shared access tokensContainer SAS options
3Permissions: Read + ListMultiple permissions
4Generate SASToken appears
5Use URL with ?restype=container&comp=list appendedXML blob list!

Generate Account SAS โ€‹

StepWhat to DoWhat to Look For
1Storage account โ†’ Shared access signatureAccount SAS blade
2Notice all the services optionsBlob, File, Queue, Table
3Notice resource typesService, Container, Object
4Generate with minimal permissionsOnly what's needed

Questions to Answer โ€‹

Q1: What's the difference between Blob SAS, Container SAS, and Account SAS?
โ†’ 

Q2: How do you revoke a SAS token?
โ†’ 

Q3: What is a Stored Access Policy? Where do you create it?
โ†’ 

Q4: What signing key was used? What happens if you rotate that key?
โ†’

Lab 10: Feature Conflicts - HNS Limitations โ€‹

๐ŸŽฏ Goal: Verify what features are unavailable with Hierarchical Namespace.

Check Data Lake Account Limitations โ€‹

In your labdatalake storage account (HNS enabled):

StepWhat to DoWhat to Look For
1Go to Data protectionData protection blade
2Look for Versioning toggleAvailable?
3Look for Point-in-time restoreAvailable?
4Look for Blob soft deleteAvailable?
5Look for Container soft deleteAvailable?

Check Standard Account Features โ€‹

In your labstandard storage account (no HNS):

StepWhat to DoWhat to Look For
1Same blade - Data protection
2VersioningAvailable โœ…
3Point-in-time restoreAvailable โœ…
4All soft delete optionsAvailable โœ…

Try Object Replication โ€‹

StepWhat to DoWhat to Look For
1In labstandard โ†’ Object replicationObject replication blade
2Note it's availableCan create rules
3In labdatalake โ†’ Object replicationSame blade
4Discovery: Is it available?Check if you can create rules

Create Feature Matrix โ€‹

Fill in what you discovered:

Feature                    | Standard (no HNS) | Data Lake (HNS)
---------------------------|-------------------|----------------
Versioning                 |                   |
Point-in-time restore      |                   |
Blob soft delete           |                   |
Container soft delete      |                   |
Object replication         |                   |
Blob index tags            |                   |
NFS 3.0 protocol           |                   |
SFTP access                |                   |
Real directory rename      |                   |
POSIX ACLs                 |                   |

๐Ÿงน Cleanup โ€‹

Don't Forget to Delete Resources!

  1. Go to Resource Groups
  2. Select rg-storage-labs
  3. Click Delete resource group
  4. Type the name to confirm
  5. Click Delete

Estimated cost if you forget: ~$5-10/month for storage accounts


Completion Checklist โ€‹

LabTopicCompleted
1Namespace Difference (Flat vs HNS)โ˜
2Access Tier Deep Diveโ˜
3Container Access Levelsโ˜
4Moving and Copying Blobsโ˜
5Lifecycle Managementโ˜
6Versioning vs Soft Deleteโ˜
7Static Websiteโ˜
8Azure Filesโ˜
9SAS Tokensโ˜
10HNS Feature Conflictsโ˜

Released under the MIT License.