DEV Community

Cover image for Creating Blob Storage in Microsoft Azure: A Step-by-Step Guide
Jimi
Jimi

Posted on

Creating Blob Storage in Microsoft Azure: A Step-by-Step Guide

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

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

    Creating Storage Account

  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
    • 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.

  1. 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.

  2. 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

  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

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

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

  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

  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

  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

    Uploading a file

  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

    Accessing the public file

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

    Changing the soft delete duration

  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

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.

Top comments (1)

Collapse
 
realcloudprojects profile image
Skill Schule

Welldone!