AZ-104 Learning Portal
Objective 2.3 40 minmedium priorityazure-filesblob-storageaccess-tiersarchivesoft-deletelifecycle-managementversioningsnapshotscontainers

2.3 — Configure Azure Files and Azure Blob Storage

Create and configure file shares and blob containers, manage blob access tiers including Archive rehydration, configure soft delete, snapshots, lifecycle management, and blob versioning.

Prerequisites: 2.2
Concept — What & Why

Azure Files: File Shares

Azure FilesA fully managed cloud file share service accessible over SMB and NFS protocols. Standard file shares use HDD-backed storage; Premium file shares (in a FileStorage account type) use SSD-backed storage and are required for NFS shares. is a fully managed cloud file share service accessible over SMB and NFS protocols.

Key configuration settings for a file share:

  • Quota: maximum size of the share in GiB (required for Premium; optional cap for Standard)
  • Protocol: SMB (default) or NFS (requires Premium file shares account; Linux/macOS only)
  • Access tier (Standard SMB only): Transaction Optimized, Hot, or Cool

Azure Blob Storage: Containers

A containerA logical grouping of blobs within a storage account. Container names must be 3–63 lowercase characters. A storage account can hold an unlimited number of containers.

Blob types:

Blob typeUse case
Block blobFiles, images, backups — most common type; supports tiering and lifecycle management
Append blobLog files and streaming data — optimized for append operations
Page blobAzure VM unmanaged disks and random read/write workloads

Blob Access Tiers

Blob access tiers let you balance storage costs against access frequency. Tiers apply to block blobs only.

TierStorage costAccess costLatencyMinimum retention
HotHighestLowestMillisecondsNone
CoolLowerHigherMilliseconds30 days
ColdLower stillHigherMilliseconds90 days
ArchiveLowestHighestUp to 15 hours180 days

Archive tierAn offline blob storage tier where data cannot be read or modified without rehydration. Rehydration sets the blob's tier to Hot, Cool, or Cold — this can take up to 15 hours at standard priority or under 1 hour for objects under 10 GB at high priority. is an offline tier where blobs cannot be read until rehydrated to Hot, Cool, or Cold (up to 15 hours at standard priority, under 1 hour at high priority for small blobs).

Early deletion charges apply if a blob is deleted or moved out of Archive before 180 days, Cool before 30 days, or Cold before 90 days.

Soft Delete

Soft delete is a separate feature for blobs and for containers — they must be configured independently.

  • Blob soft deleteProtects individual blobs, snapshots, and versions from accidental deletion or overwrite. Deleted items are retained for a configurable period (1–365 days) and can be restored via Undelete. Does NOT protect against container or account deletion.
  • Container soft deleteProtects entire containers from deletion. Deleted containers (and their blobs) can be restored during the retention period.

Azure Files soft delete is a separate feature for file shares — configured on the file share itself, not on individual files.

Blob Lifecycle Management

Lifecycle managementRule-based JSON policies that automatically transition blobs between tiers or delete them. Policies run daily and apply to block blobs only for tiering actions. uses rule-based JSON policies that automatically transition blobs between tiers or delete them — policies run daily and apply to block blobs only for tiering actions.

ActionSupported blob typesNotes
TierToCoolBlock blobsNot supported on Premium accounts
TierToColdBlock blobsNot supported on Premium accounts
TierToArchiveBlock blobsNot supported for ZRS, GZRS, or RA-GZRS accounts
DeleteBlock blobs, append blobsSoft-deletes if soft delete is enabled
enableAutoTierToHotFromCoolBlock blobsRequires last-access-time tracking

Blob Versioning

Blob versioningAutomatically maintains previous versions of a blob on every write or overwrite. Versions are identified by a versionId. Not supported for accounts with hierarchical namespace (Data Lake Storage Gen2). automatically maintains previous blob versions on every write, identified by a versionId. Not supported on accounts with hierarchical namespace (Data Lake Storage Gen2).

Deep Dive — How It Works

Archive Tier — Offline and Rehydration

Exam Trap

"Lifecycle management can move blobs from Archive back to Hot." → Lifecycle management can only move blobs to cooler tiers. It CANNOT rehydrate archived blobs. Rehydration requires Set Blob Tier or Copy Blob operations.

Must Memorize

While in the Archive tier, a blob is offline — its data cannot be read or modified. The metadata remains readable, but the content is inaccessible until rehydration completes (up to 15 hours standard priority, under 1 hour for small blobs at high priority).

Soft Delete Scope Boundaries

Exam Trap

"Blob soft delete protects against container deletion." → Blob soft delete only protects individual blobs, snapshots, and versions. To protect containers from accidental deletion, you must separately enable container soft delete.

TierToArchive and Zone-Redundant Storage

Exam Trap

"TierToArchive is supported on all redundancy options." → Archive tier and TierToArchive lifecycle actions are NOT supported for ZRS, GZRS, or RA-GZRS accounts. Only LRS, GRS, and RA-GRS support the Archive tier.

Blob Versioning and HNS Incompatibility

Exam Trap

"Blob versioning and hierarchical namespace (HNS) work together." → Blob versioning is not supported on storage accounts that have hierarchical namespace (Data Lake Storage Gen2) enabled. These two features are incompatible.

Azure Files Snapshots

An Azure Files snapshotA read-only, point-in-time copy of a file share capturing the state of all files. Snapshots are incremental — only changes since the last snapshot consume additional storage. Individual files can be restored without restoring the entire share. is a read-only, point-in-time copy of a file share. Snapshots are incremental — only changes since the last snapshot consume additional storage — and individual files can be restored without restoring the entire share.

Exam Trap

"Snapshots for Azure Files work the same as blob snapshots." → Azure Files snapshots are share-level (all files in the share), not file-level. They are read-only and cannot be independently soft-deleted; they exist as long as the share itself is retained.

Lifecycle Policy Conflict Resolution

When multiple lifecycle policy actions match the same blob, the least expensive action wins (e.g., TierToArchive wins over Delete if Archive is cheaper than deletion at that retention level).

Hands-On Lab

Create an Azure Files File Share

Portal → Storage account → Data storageFile shares+ File share

  1. Enter a Name (lowercase, no spaces).
  2. Set the Tier: Transaction Optimized, Hot, or Cool (Standard accounts only).
  3. Optionally set a Quota (maximum size in GiB).
  4. Select Create.

Create a Blob Container

Portal → Storage account → Data storageContainers+ Container

  1. Enter a Name (3–63 lowercase characters).
  2. Set the Public access level: Private (default), Blob, or Container.
  3. Select Create.

Configure Blob Access Tier on a Container/Account

Portal → Storage account → SettingsConfiguration

  1. Under Blob access tier (default), select Hot or Cool (account-level default for new blobs).
  2. Select Save.

To change the tier of an individual blob: navigate to the blob → select Change tier → choose the new tier → select Save.

Enable Soft Delete for Blobs and Containers

Portal → Storage account → Data managementData protection

  1. Under Recover deleted blobs, enable Turn on soft delete for blobs and set retention days (1–365).
  2. Under Recover deleted containers, enable Turn on soft delete for containers and set retention days.
  3. Optionally enable Turn on versioning for blobs.
  4. Select Save.

Enable Soft Delete for Azure Files

Portal → Storage account → Data storageFile sharesFile share settings (or Soft delete blade)

  1. Enable Soft delete for file shares.
  2. Set the retention period (1–365 days).
  3. Select Save.

Configure Blob Lifecycle Management

Portal → Storage account → Data managementLifecycle management+ Add a rule

  1. Enter a Rule name.
  2. Under Rule scope, choose to apply to all blobs or filter by prefix/blob index.
  3. Under Base blobs set conditions and actions:
    • E.g., "If base blobs were last modified more than 30 days ago, move to Cool"
    • E.g., "If base blobs were last modified more than 365 days ago, Delete"
  4. Select Add then Save.

Create and Restore an Azure Files Snapshot

Portal → Storage account → Data storageFile shares → (select share) → Snapshots

  1. Select + Add snapshot and optionally add a note.
  2. To restore a file: select the snapshot → browse to the file → select Restore.
Exam Angle — What AZ-104 Tests

AZ-104 Exam Focus

Exam Trap

"Lifecycle management can move blobs from Archive back to Hot." → Lifecycle management can only move blobs to cooler tiers. Rehydration from Archive requires Set Blob Tier or Copy Blob — not a lifecycle policy.

Exam Trap

"Blob soft delete protects against container deletion." → Blob soft delete only protects individual blobs. To protect containers, separately enable container soft delete.

Exam Trap

"The Archive tier is just a very cool tier with slow access." → Archive blobs are offline — they cannot be read or modified at all without first rehydrating. The metadata is readable, but the data is inaccessible until rehydration completes.

Exam Trap

"TierToArchive is supported on all redundancy options." → Archive tier is not supported for ZRS, GZRS, or RA-GZRS.

Exam Trap

"Blob versioning and hierarchical namespace (HNS) work together." → Blob versioning is not supported on storage accounts with hierarchical namespace (Data Lake Storage Gen2) enabled.

Exam Tip

When you see a scenario with a lifecycle policy and soft delete both enabled, remember: the delete lifecycle action soft-deletes the blob rather than permanently deleting it. The blob will still be retained for the soft-delete retention period.

Question — click to flip

Q: What must happen before you can read the contents of a blob in the Archive tier?

Question — click to flip

Q: Does blob soft delete protect against accidental container deletion?

Question — click to flip

Q: Can lifecycle management rehydrate blobs from Archive to Hot?

Question — click to flip

Q: Which blob types support lifecycle management tiering actions (TierToCool, TierToCold, TierToArchive)?

Question — click to flip

Q: Is blob versioning compatible with storage accounts that have hierarchical namespace (Data Lake Gen2) enabled?

Question — click to flip

Q: What is the minimum retention period before a blob can be deleted from the Archive tier without early deletion charges?

Sources & Further Reading