Creating Blob Storage in Microsoft Azure: A Step-by-Step Guide
Tags: azure, microsoft, cloud, storage
Published: 2024-07-03 20:41:12

Blob storage is a fundamental service offered by Microsoft Azure for storing massive amounts of unstructured data. This data can be anything from text files and images to videos and backups. In this blog post, we'll walk you through creating Blob storage in Azure, configuring access levels, and even adding some redundancy measures.

###  Setting Up the Foundation: The Storage Account

1. **Finding Your Storage Account:**  Log in to the Azure portal and navigate to the "Storage Accounts" section. You can either search for it directly or find it through the dropdown menu.

    ![Locating Storage Account](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x3vjer70685fema1z1t0.jpg)

2. **Clicking Create:**  This button initiates the storage account creation process.

    ![Creating Storage Account](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tt8n1wk0rjwqekv8tjou.jpg)

3. **Configuring the Storage Account:**  Here's where you'll define some key details:
    * **Resource Group:**  Create a new resource group or choose an existing one to organize your Azure resources.
    ![Configuring Storage Account](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vscysfbr26r60qr67vp2.jpg)
    * **Storage Account Name:**  Pick a unique and descriptive name for your storage account. Remember, this name needs to adhere to DNS naming conventions. 
    * **Region:**  Select a region where your data will be stored. Ideally, choose a region closest to your target audience for optimal performance.

**Pro Tip:** Leave all the other settings on their default values for now. You can always customize them later based on your specific needs.

4. **Reviewing and Creating:**  Once you've filled out the details, click "Review + create" to double-check your configuration. If everything looks good, proceed with the creation process.

5. **Accessing Your Resource:**  After successful creation, click "Go to resource" to access your newly minted storage account.

###  Enabling High Availability with RA-GRS

1. **Reaching the Data Management Section:**  Within your storage account settings, locate the "Redundancy" section. This is typically found under "Data management."

    ![Locating Redundancy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/baavi8f8zvd1lvqdkg5g.jpg)

2. **Enabling Read-Access Geo-Redundant Storage (RA-GRS):**  Select "RA-GRS" from the available redundancy options. This ensures your data is replicated across geographically separated locations, offering superior disaster recovery capabilities.

    ![Changing Redundancy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88dn2zdoc0y6tz5c1kmi.jpg)

###  Granting Anonymous Access (with Caution)

**Important Note:** Enabling anonymous access makes your blob storage publicly accessible. This is useful for scenarios where you want to share files directly through a web browser, but proceed with caution and only if necessary for your use case.

1. **Accessing Configuration Settings:**  Navigate to the "Settings" dropdown menu and select "Configuration."

2. **Enabling Blob Anonymous Read Access:**  Under "Public access settings," locate "Blob anonymous read access" and set it to "Enabled." Remember to keep other access settings to their defaults for now.

3. **Saving Changes:**  Click "Save" to apply the configuration.

    ![Configuring the Storage Account](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z9nrasujt1w2nrb0lvx5.jpg)

###  Creating and Uploading to Blob Storage

1. **Reaching the Blob Storage Section:**  In the left-hand menu of your storage account, navigate to the "Data storage" section and select "Containers."

    ![Locating the Storage Container](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sr85p2iscrcgyjs6n8t4.jpg)

2. **Creating a Container:**  Click the "+ Container" button and provide a unique name for your container.  Think of a container as a virtual folder within your blob storage.

    ![Naming the container](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ldkmp8pn9bes98a7ic9s.jpg)

3. **Change Access Level:** Navigate to the container and click on the "Change access level" button. Change the "Anonymous access level" to Blob (anonymous read access for blobs only).

    ![Changing the access level](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f3pbefylvqq5q8ypfzcq.jpg)

4. **Uploading a File:**  Navigate baack to the container and click the "Upload" button. Select the file you wish to upload from your local machine and click "Upload" again.

    ![Upload button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/47a5rcrah2m4af3ay19f.jpg)

    ![Uploading a file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/adtuq8k6i114dwwsitla.jpg)

5. **Testing Accessibility:**  After the upload is complete, locate the uploaded file and click on it. This will generate a unique URL. Copy this URL and paste it into your web browser. If anonymous access is configured correctly, you should be able to access the file directly through the browser.

    ![Copying the public upload link](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bbytq0wm7zw00c7xh9y2.jpg)

    ![Accessing the public file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y8amrlb24bn28uzmi2pu.jpg)

###  Optional Configurations: Soft Delete and Versioning

While we've established the core functionalities of blob storage, here are a couple of optional configurations to consider:

1. **Enabling Soft Delete:**  This feature allows you to recover accidentally deleted files for a certain period. Navigate back to the container overview and locate the "Blob service" section. Select "Soft delete" and define the retention period for deleted blobs.

    ![Locating Soft delete](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wevyjej6m1n0wp3nxkk9.jpg)

    ![Changing the soft delete duration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6b7jdcllls3ym3j2fibk.jpg)

2. **Enabling Blob Versioning:**  This keeps track of different versions of the same file uploaded over time. This can be helpful if you need to revert to a previous version of the file.  Navigate back to the container overview and locate the "Blob service" section. Select "Versioning" and enable it.

    ![Enabling versioning](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/06nn7slf99lx3ysviw3b.jpg)

###  Cleaning Up

Once you're finished experimenting, it's crucial to clean up your resources to avoid unnecessary charges. Remember to delete the storage account and any associated containers you created.

This blog post has equipped you with the knowledge to create blob storage in Microsoft Azure, configure access levels, and implement basic data protection measures. By following these steps, you can leverage the power of Azure Blob storage for your cloud storage needs.