2020-02-10 21:12:57 -05:00
---
lab:
2023-06-12 15:29:26 -07:00
title: 'Lab 07: Manage Azure storage'
2022-09-01 13:00:25 -07:00
module: 'Administer Azure Storage'
2020-02-10 21:12:57 -05:00
---
# Lab 07 - Manage Azure Storage
2024-02-23 07:32:32 -08:00
## Lab introduction
2020-05-01 10:05:07 -07:00
2024-02-23 07:32:32 -08:00
In this lab you learn to create storage accounts for Azure blobs and Azure files. You learn to configure and secure blob containers. You also learn to use Storage Browser to configure and secure Azure file shares.
2021-07-11 19:38:58 -07:00
2024-02-23 07:32:32 -08:00
This lab requires an Azure subscription. Your subscription type may affect the availability of features in this lab. You may change the region, but the steps are written using **East US** .
2021-07-11 19:38:58 -07:00
2024-02-23 07:32:32 -08:00
## Estimated timing: 50 minutes
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
## Lab scenario
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
Your organization is currently storing data in on-premises data stores. Most of these files are not accessed frequently. You would like to minimize the cost of storage by placing infrequently accessed files in lower-priced storage tiers. You also plan to explore different protection mechanisms that Azure Storage offers, including network access, authentication, authorization, and replication. Finally, you want to determine to what extent Azure Files is suitable for hosting your on-premises file shares.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
## Interactive lab simulations
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
There are interactive lab simulations that you might find useful for this topic. The simulation lets you to click through a similar scenario at your own pace. There are differences between the interactive simulation and this lab, but many of the core concepts are the same. An Azure subscription is not required.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
+ [Create blob storage ](https://mslearn.cloudguides.com/en-us/guides/AZ-900%20Exam%20Guide%20-%20Azure%20Fundamentals%20Exercise%205 ). Create a storage account, manage blob storage, and monitor storage activities.
+ [Manage Azure storage ](https://mslabs.cloudguides.com/guides/AZ-104%20Exam%20Guide%20-%20Microsoft%20Azure%20Administrator%20Exercise%2011 ). Create a storage account and review the configuration. Manage blob storage containers. Configure storage networking.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
## Architecture diagram
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00

2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
## Job skills
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
+ Task 1: Create and configure a storage account.
+ Task 2: Create and configure secure blob storage.
+ Task 3: Create and configure secure Azure file storage.
2020-10-16 11:41:57 -04:00
2024-02-23 07:32:32 -08:00
## Task 1: Create and configure a storage account.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
In this task, you will create and configure a storage account. The storage account will use geo-redundant storage and will not have public access.
2021-11-04 10:38:40 +01:00
2024-02-23 07:32:32 -08:00
1. Sign in to the **Azure portal** - `https://portal.azure.com` .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Search for and select `Storage accounts` , and then click ** + Create**.
2023-04-07 11:36:54 -07:00
2024-02-23 07:32:32 -08:00
1. On the **Basics** tab of the **Create a storage account** blade, specify the following settings (leave others with their default values):
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
| Setting | Value |
| --- | --- |
| Subscription | the name of your Azure subscription |
| Resource group | **az104-rg7** (create new) |
| Storage account name | any globally unique name between 3 and 24 in length consisting of letters and digits |
| Region | ** (US) East US** |
| Performance | **Standard** (notice the Premium option) |
| Redundancy | **Geo-redundant storage** (notice the other options)|
| Make read access to data in the event of regional availability | Check the box |
2020-02-10 21:12:57 -05:00
2025-03-28 06:13:53 -07:00
>**Did you know?** You should use the Standard performance tier for most applications. Use the Premium performance tier for enterprise or high-performance applications.
2022-05-03 06:57:51 -07:00
2024-02-23 07:32:32 -08:00
1. On the **Advanced** tab, use the informational icons to learn more about the choices. Take the defaults.
2020-02-10 21:12:57 -05:00
2025-03-28 06:13:53 -07:00
1. On the **Networking** tab, in the **Public network access** section, select **Disable** . This will restrict inbound access while allowing outbound access.
2020-02-10 21:12:57 -05:00
2025-03-28 06:13:53 -07:00
1. Review the **Data protection** tab. Notice 7 days is the default soft delete retention policy. Note you can enable versioning for blobs. Accept the defaults.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Review the **Encryption** tab. Notice the additional security options. Accept the defaults.
2020-02-10 21:12:57 -05:00
2025-03-28 06:13:53 -07:00
1. Select **Review + Create** , wait for the validation process to complete, and then click **Create** .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Once the storage account is deployed, select **Go to resource** .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Review the **Overview** blade and the additional configurations that can be changed. These are global settings for the storage account. Notice the storage account can be used for Blob containers, File shares, Queues, and Tables.
2020-08-12 09:36:24 -04:00
2025-03-28 06:13:53 -07:00
1. In the **Security + networking** blade, select **Networking** . Notice **Public network access** is disabled.
2020-02-10 21:12:57 -05:00
2025-03-28 06:13:53 -07:00
+ Select **Manage** the **Public network access** .
+ Change the **Public network access** to **Enable** .
+ Change the **Default action** to **Enable from selected networks** .
+ In the **IP addresses** section, select **Add your client IP address** .
+ **Save** your changes.
2024-02-23 07:32:32 -08:00
2025-03-28 06:13:53 -07:00
1. In the **Data management** blade, select **Redundancy** . Notice the information about your primary and secondary data center locations.
2020-02-10 21:12:57 -05:00
2025-03-28 06:13:53 -07:00
1. In the **Data management** blade, select **Lifecycle management** , and then select **Add a rule** .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
+ **Name** the rule `Movetocool` . Notice your options for limiting the scope of the rule.
+ On the **Base blobs** tab, *if* based blobs were last modified more than `30 days` ago *then* **move to cool storage** . Notice your other choices.
+ Notice you can configure other conditions. Select **Add** when you are done exploring.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00

2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
## Task 2: Create and configure secure blob storage
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
In this task, you will create a blob container and upload an image. Blob containers are directory-like structures that store unstructured data.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
### Create a blob container and a time-based retention policy
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Continue in the Azure portal, working with your storage account.
2020-02-10 21:12:57 -05:00
2025-03-28 06:13:53 -07:00
1. In the **Data storage** blade, select **Containers** .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Click ** + Container** and **Create** a container with the following settings:
2020-02-10 21:12:57 -05:00
| Setting | Value |
| --- | --- |
2024-02-23 07:32:32 -08:00
| Name | `data` |
| Public access level | Notice the access level is set to private |
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00

2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. On your container, scroll to the ellipsis (...) on the far right, select **Access Policy** .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. In the **Immutable blob storage** area, select **Add policy** .
2020-02-10 21:12:57 -05:00
| Setting | Value |
| --- | --- |
2024-02-23 07:32:32 -08:00
| Policy type | **Time-based retention** |
| Set retention period for | `180` days |
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Select **Save** .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
### Manage blob uploads
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Return to the containers page, select your **data** container and then click **Upload** .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. On the **Upload blob** blade, expand the **Advanced** section.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
>**Note**: Locate a file to upload. This can be any type of file, but a small file is best. A sample file can be downloaded from the AllFiles directory.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
| Setting | Value |
| --- | --- |
| Browse for files | add the file you have selected to upload |
| Select **Advanced** | |
| Blob type | **Block blob** |
| Block size | **4 MiB** |
| Access tier | **Hot** (notice the other options) |
| Upload to folder | `securitytest` |
| Encryption scope | Use existing default container scope |
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Click **Upload** .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Confirm you have a new folder, and your file was uploaded.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Select your upload file and review the options including **Download** , **Delete** , **Change tier** , and **Acquire lease** .
2020-02-10 21:12:57 -05:00
2025-04-04 14:09:12 -07:00
1. Copy the file **URL** (Properties blade) and paste into a new **Inprivate** browsing window.
2020-02-10 21:12:57 -05:00
2020-07-04 18:10:21 +02:00
1. You should be presented with an XML-formatted message stating **ResourceNotFound** or **PublicAccessNotPermitted** .
2020-02-10 21:12:57 -05:00
2020-02-13 19:53:13 -05:00
> **Note**: This is expected, since the container you created has the public access level set to **Private (no anonymous access)**.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
### Configure limited access to the blob storage
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Select your uploaded file and then on the **Generate SAS** tab. You can also use the ellipsis (...) to the far right. Specify the following settings (leave others with their default values):
2020-02-10 21:12:57 -05:00
| Setting | Value |
| --- | --- |
2021-02-10 23:43:02 -07:00
| Signing key | **Key 1** |
2024-02-23 07:32:32 -08:00
| Permissions | **Read** (notice your other choices) |
2020-02-10 21:12:57 -05:00
| Start date | yesterday's date |
| Start time | current time |
| Expiry date | tomorrow's date |
| Expiry time | current time |
| Allowed IP addresses | leave blank |
1. Click **Generate SAS token and URL** .
2024-02-23 07:32:32 -08:00
1. Copy the **Blob SAS URL** entry to the clipboard.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Open another InPrivate browser window and navigate to the Blob SAS URL you copied in the previous step.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
>**Note**: You should be able to view the content of the file.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
## Task 3: Create and configure an Azure File storage
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
In this task, you will create and configure Azure File shares. You will use Storage Browser to manage the file share.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
### Create the file share and upload a file
2020-02-10 21:12:57 -05:00
2025-03-28 06:13:53 -07:00
1. In the Azure portal, navigate back to your storage account, in the **Data storage** blade, click **File shares** .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Click ** + File share** and on the **Basics** tab give the file share a name, `share1` .
2020-02-10 21:12:57 -05:00
2024-05-18 07:13:06 -07:00
1. Notice the **Access tier** options. Keep the default **Transaction optimized** .
2024-02-23 07:32:32 -08:00
2024-05-18 07:13:06 -07:00
1. Move to the **Backup** tab and ensure **Enable backup** is **not** checked. We are disabling backup to simplify the lab configuration.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Click **Review + create** , and then **Create** . Wait for the file share to deploy.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00

2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
### Explore Storage Browser and upload a file
2020-02-10 21:12:57 -05:00
2024-05-18 07:13:06 -07:00
1. Return to your storage account and select **Storage browser** . The Azure Storage Browser is a portal tool that lets you quickly view all the storage services under your account.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Select **File shares** and verify your **share1** directory is present.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Select your **share1** directory and notice you can ** + Add directory**. This lets you create a folder structure.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Select **Upload** . Browse to a file of your choice, and then click **Upload** .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
>**Note**: You can view file shares and manage those shares in the Storage Browser. There are currently no restrictions.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
### Restrict network access to the storage account
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. In the portal, search for and select **Virtual networks** .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Select ** + Create**. Select your resource group. and give the virtual network a **name** , `vnet1` .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Take the defaults for other parameters, select **Review + create** , and then **Create** .
2022-05-08 13:22:40 +12:00
2024-02-23 07:32:32 -08:00
1. Wait for the virtual network to deploy, and then select **Go to resource** .
2020-02-10 21:12:57 -05:00
2024-05-23 11:15:33 -07:00
1. In the **Settings** section, select the **Service endpoints** blade.
+ Select **Add** .
+ In the **Services** drop-down select **Microsoft.Storage** .
+ In the **Subnets** drop-down check the **Default** subnet.
+ Click **Add** to save your changes.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Return to your storage account.
2020-02-10 21:12:57 -05:00
2025-03-28 06:13:53 -07:00
1. In the **Security + networking** blade, select **Networking** .
2020-02-10 21:12:57 -05:00
2025-03-28 06:13:53 -07:00
1. Select **Add existing virtual network** and select **vnet1** and **default** subnet, select **Add** .
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. In the **Firewall** section, **Delete** your machine IP address. Allowed traffic should only come from the virtual network.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Be sure to **Save** your changes.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
>**Note:** The storage account should now only be accessed from the virtual network you just created.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
1. Select the **Storage browser** and **Refresh** the page. Navigate to your file share or blob content.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
>**Note:** You should receive a message *not authorized to perform this operation* . You are not connecting from the virtual network. It may take a couple of minutes for this to take effect.
2022-02-09 07:49:13 -08:00
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00

2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
## Cleanup your resources
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
If you are working with **your own subscription** take a minute to delete the lab resources. This will ensure resources are freed up and cost is minimized. The easiest way to delete the lab resources is to delete the lab resource group.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
+ In the Azure portal, select the resource group, select **Delete the resource group** , **Enter resource group name** , and then click **Delete** .
+ Using Azure PowerShell, `Remove-AzResourceGroup -Name resourceGroupName` .
+ Using the CLI, `az group delete --name resourceGroupName` .
2020-02-10 21:12:57 -05:00
2024-05-10 07:33:59 -07:00
## Extend your learning with Copilot
Copilot can assist you in learning how to use the Azure scripting tools. Copilot can also assist in areas not covered in the lab or where you need more information. Open an Edge browser and choose Copilot (top right) or navigate to *copilot.microsoft.com* . Take a few minutes to try these prompts.
+ Provide an Azure PowerShell script to create a storage account with a blob container.
+ Provide a checklist I can use to ensure my Azure storage account is secure.
+ Create a table to compare Azure storage redundancy models.
## Learn more with self-paced training
+ [Optimize your cost with Azure Blob Storage ](https://learn.microsoft.com/training/modules/optimize-your-cost-azure-blob-storage/ ). Learn how to optimize your cost with Azure Blob Storage.
+ [Control access to Azure Storage with shared access signatures ](https://learn.microsoft.com/training/modules/control-access-to-azure-storage-with-sas/ ). Grant access to data stored in your Azure Storage accounts securely by using shared access signatures.
2024-02-23 07:32:32 -08:00
## Key takeaways
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
Congratulations on completing the lab. Here are the main takeaways for this lab.
2020-02-10 21:12:57 -05:00
2024-02-23 07:32:32 -08:00
+ An Azure storage account contains all your Azure Storage data objects: blobs, files, queues, and tables. The storage account provides a unique namespace for your Azure Storage data that is accessible from anywhere in the world over HTTP or HTTPS.
+ Azure storage provides several redundancy models including Locally redundant storage (LRS), Zone-redundant storage (ZRS), and Geo-redundant storage (GRS).
+ Azure blob storage allows you to store large amounts of unstructured data on Microsoft's data storage platform. Blob stands for Binary Large Object, which includes objects such as images and multimedia files.
+ Azure file Storage provides shared storage for structured data. The data can be organized in folders.
+ Immutable storage provides the capability to store data in a write once, read many (WORM) state. Immutable storage policies can be time-based or legal-hold.