DEV Community

Cover image for Azure Storage Account: A Guide To Creating an Azure Storage Account and a Blob Storage Container.
Kehinde Onifade
Kehinde Onifade

Posted on

Azure Storage Account: A Guide To Creating an Azure Storage Account and a Blob Storage Container.

Imagine you run a bakery. You have different types of products like bread, cakes, cookies, and pastries. You need a place to store all these items, where they are safe, organized, and can be easily accessed whenever you need them. In your bakery, you might use different storage containers or shelves to keep everything in order.

Think of an Azure Storage Account as a big, organized, and secure warehouse in the digital world. Here’s how it works. Just like in your bakery, where you have different shelves for bread, cakes, and cookies, an Azure Storage Account has different types of storage for different kinds of data. Blob Storage for large files such as images, videos, and documents (like your cakes and pastries). File Storage for shared files that many people or systems need to access (like a shared recipe book for your bakery staff). Queue Storage for messaging between different parts of your application (like a to-do list for your bakery staff). Table Storage for structured data, like customer orders or inventory lists (like a register or catalog in your bakery). Security and Access: Just like you’d lock your bakery at night and only give keys to trusted employees, Azure Storage Account ensures your data is secure and only accessible to people or applications you trust. Scalability: If your bakery grows and you start getting more customers, you might need more storage space. Similarly, an Azure Storage Account can easily scale up to store more data as your needs grow. By providing your data with a unique namespace, this storage account enables effortless global accessibility through HTTP or HTTPS.

What is Azure Storage?
Azure offers a variety of data storage solutions, including databases like Azure SQL Database, Azure Cosmos DB, and Azure Table Storage. It also provides messaging services such as Azure Queues and Event Hubs. For storing loose files, you can use Azure Files and Azure Blobs.
Azure Storage encompasses four core data services: Azure Blobs, Azure Files, Azure Queues, and Azure Tables. These services are grouped under the Azure Storage umbrella.

What is a storage account?
A storage account is a container that organizes a set of Azure Storage services. It exclusively includes data services from Azure Storage, such as Azure Blobs, Azure Files, Azure Queues, and Azure Tables. The following illustration depicts a storage account with various data services.

Image description

What is Azure Blob Storage?
Azure Blob Storage can be thought of as a vast digital warehouse where you can securely store various types of data. Instead of physical items, this storage holds digital files such as images, videos, documents, and software applications. Imagine you run a bakery where you create and sell various delicious treats like bread, cakes, cookies, and pastries. To keep your bakery running smoothly, you need a reliable storage solution where you can safely store all these items. Just like in your bakery, where you use different containers or shelves to keep everything organized and accessible, Azure Blob Storage provides a similar function in the digital world.
In Azure Blob Storage, you can store different types of digital "ingredients" or files, such as images, videos, documents, and applications. Each type of file can be securely stored and organized within Azure Blob Storage, ensuring they are easily accessible whenever you need them. Just as your bakery ensures that all items are stored safely and can be easily retrieved to serve your customers, Azure Blob Storage ensures that your digital files are securely stored and readily available for your applications and users.

Let’s dive into creating an Azure storage account and a Blob storage container. The steps below will guide you through the process.

  1. Prerequisite
  2. Create Your Storage Account
  3. Create Your Blob Container
  4. Types of Access Tier

Prerequisite:
a. If you don't have an Azure subscription, create a free account before you begin.
b. Log in to the Azure Portal.

Create Your Storage Account:
a. Sign in to Azure Portal
b. Click on the search bar and type “Storage Account.”
Image description

c. Select “Create”, this will take you to the “Basic” page to set up your storage account.
Image description

Provide the necessary details, including the account name, subscription, resource group, region, and redundancy options (locally redundant storage, geo-redundant storage, or read-access geo-redundant storage).

d. Under the project details, click to choose your existing subscription.
e. Click on “Create new” to create your resource group.

Image description

f. Scroll down to the instance details to input your globally unique storage account name (The name must be unique within Azure, use only lowercase letters and digits between 3 and 24 characters.) Select the region in which your storage will be deployed.
g. Click on the “Standard” option. This option decides the type of disk storage used to hold the data in the Storage account. Standard uses traditional hard disks, and Premium uses solid-state drives (SSD) for faster access.
h. For redundancy, select “Geo-redundant storage (GRS)” This option has a failover capability in a secondary region and is recommended for backup scenarios. They are also stored in two regions.
i. You can select any of the redundancy option based on your needs, but for this guide we are going with GRS.

Image description

j. Click on “Next: Advance>”, and scroll down to the Blob storage section.
k. On the Access tier, click on “hot” to frequently access your data at any time.

Please, note that there are three types of Access tiers available namely: Hot, Cool, and Archive. When creating a storage account, only the Hot and cool tiers can be seen, however, we will demonstrate how to switch to the Archive tier once the blob storage has been created.

l. Click on Next: Networking> to configure your networking:

Image description

m. On the Networking page, go to “Network connectivity” and enable public access from all networks.
n. When enabled, the URL of the storage can be accessed over the internet. If it is disabled, it becomes private and accessible to you alone.

Image description

o. Scroll down to Network routing and leave the preference default state “Microsoft network routing”
p. Click on Next: Data protection>

Image description

q. On the Data protection page, leave it in its default state. The purpose of this page is to retrieve your deleted storage within a minimum retention period of 7 days.

Image description

r. Skip the other settings then go to Review.
s. On the Review page, you can see a summary of all that you've done. Click on "Create"
t. Once validation is passed, click on "Review +create"

Image description

u. This will take you to the deployment page, once the deployment is complete, this means that your Storage Account is created, then click on “Go to resource” and you will be directed to the storage account page.

Image description

Image description

Create Your Blob Container:
a. After your storage account is created, click on it to access the overview.

b. Navigate to the “Containers” tab. (Scroll to the left of your storage page, under data storage, and click on "Container")

Image description

c. Click “+ Container” to create a new container.

Image description

d. Choose a unique container name and set the public access level. (Private, blob, container, or anonymous).

e. On the public access level, click on the dropdown menu and pick "Blob" to grant public access to the internet.
f. Click on the “Create button”

Image description

g. Your Container is created and should reflect as seen below. To proceed, you can just click on your container.

Image description

  1. Upload Files to the Blob Container: a. In the container overview, click the “Upload button” to upload a document or picture (Unstructured data). Image description

b. Select files from your local device and upload them to the container by clicking on "Browse for files or drag”

Image description

Image description

  1. Retrieve and View Blob Files/Image(s): a. Your image will upload as shown below in your container.

Image description
b. To download files from the container, click on the file name and choose “Download.”

c. Once you click on the Uploaded blob, copy the URL.
Image description

d. Paste the URL on your web browser to publicly gain access to the document. (See the sample uploaded image below)
Image description

e. You can also delete files or containers by clicking the ellipsis icon and selecting “Delete.

  1. Types of Access Tiers Azure Storage provides various access tiers, allowing you to store your blob data most economically depending on its usage. Think of it like a library where you manage your books. In this library, there are different sections for storing books based on how frequently they are read. Each section represents a different access tier.

Hot Access Tier
Imagine the main reading area in a library, right near the entrance. This is where you keep your favorite books, the ones you read frequently. They're easily accessible, so you can quickly grab a book and start reading whenever you want. This represents the hot access tier in Azure Storage, where you store files and data that you frequently use and need immediate access to.

Cool Access Tier
Imagine a section in the library where you store books that you enjoy but don't read as often. These books are still protected and well-organized, but they’re not in the main reading area for immediate access. You might need to move a few items to reach them. This represents the cool access tier in Azure Storage, where you store files and data that you don’t use as frequently but still want to keep securely and access relatively easily.

The advantage of using the cool access tier is that it is more cost-effective than the "hot access tier," which is reserved for items you need more frequently. Data in the cool tier should be stored for a minimum of 30 days.

Archive Access Tier
Finally, imagine a separate storage room within the library, like a locked archive. This is where you keep rare books or documents that you don't need to access for a very long time but want to preserve for the future. It's not readily accessible, and you would need to go through extra steps to retrieve them, such as unlocking the room or moving other items.

This represents the archive access tier in Azure Storage, where you store files and data that you rarely need to access but want to keep for long-term preservation. Data in the archive tier should be stored for a minimum of 180 days and offers the lowest storage cost.

How to Change Access Tier
a. Navigate to the Blob Page: Stay on the blob page and click on "Change Tier".
b. Access the Change Tier Panel: The Change Tier panel will appear on the right side of the container.
c. Select Preferred Access Tier: Click on the drop-down menu to select your desired access tier. This process applies to all access tiers.

Image description

Image description

Clean Up
At the end of a project, it's wise to assess whether you still need the resources you created in your subscription. Leaving unused resources running can incur costs. You can either delete resources individually or remove the entire resource group to eliminate all associated resources at once.
Use the following steps in the Azure portal to delete the resource group and all associated resources.
a. In the resource menu, select resource groups.
b. Select the resource group you created.

c. In the command bar, select Delete resource group.
Image description

d. In the confirmation pane, you're prompted to type the resource group name; you can right-click and drag the title from the Resource group pane.
d. When the expected name is a match, Delete is available.

f. Select Delete. It may take several minutes to delete your resource group.
Image description

g. Check Notifications in the Global Controls in the upper right corner of the Azure portal to ensure your operation is completed.

Top comments (0)