Free access is closing! 700+ free courses are waiting.
Ends in:
Start Now
To create a Storage Account, you can use the Azure Portal if you prefer a graphical user interface, or opt for PowerShell or the Azure CLI if you prefer scripting.
1. From the Azure Portal, click “Create a resource.”
2. Go to “Storage,” then select “Storage account.” Alternatively, you can type “storage account” in the search box.
3. Under the “Basics” tab, you’ll find the required settings for the storage account:

Setting up the “Basics” settings for a storage account. Image by author
4. The following settings are optional but are enjoyable to customize your Storage Account further:
5. Review the configurations and click “Review+Create.” After validation, click “Create” to finalize the storage account's creation. If validation fails, you’ll need to review the settings and correct any incorrect or missing required settings.
To create a Storage Account using PowerShell, follow these steps:
1. Open the PowerShell console and log in to your Azure account using:
2. Create a new resource group if you don't already have one:
New-AzResourceGroup -Name “ResourceGroup001”> -Location “EastUS”
3. Create the storage account:
New-AzStorageAccount -ResourceGroupName “ResourceGroup001”> -Name “datastorage” -Location “EastUS” -SkuName “Standard_LRS” -Kind “StorageV2”
This code directly creates a storage account named “datastorage” in the “ResourceGroup001” resource group and the “EastUS” Azure Region.
The SkuName refers to the performance tier (Standard or Premium) and the redundancy option (in this case, “LRS” or locally redundant storage). You can include additional settings in the same way; for example, you can include tags with the -Tags option.
You can look up additional commands for storage accounts on the Microsoft website.
4. Verify whether the Storage Account creation by using this code to look up your new account:
To create a Storage Account using the Azure CLI, follow these steps:
1. Open the CLI console and sign in to your Azure account:
2. Create a resource group (if you don't have one already):
3. Create the Storage Account:
az storage account create --name mystorageaccount --resource-group myResourceGroup --location eastus --sku Standard_LRS --kind StorageV2 You can also add additional options for your storage account, such as --tags.
Check out the DataCamp Azure CLI Cheat Sheet to learn more about using Azure CLI.
4. Check if the Storage Account was successfully created:
For most storage scenarios, the “General purpose v2 storage” account type is the recommended storage account type. This type provides the latest features for Azure storage, is most cost-effective, and supports all storage types, such as blobs, files, and queues.
In this section, we’ll explore these storage types and their uses in more depth and discuss how to manage costs.
Each storage account type is tailored to specific storage needs. Understanding the differences between these storage account types and their use cases will help you make informed decisions when setting up and managing your Azure storage solutions.
Here’s an overview of the different storage account data types:
|
Overview |
Use cases | |
|
Blob storage |
Blob storage is specialized for storing unstructured data as blobs (binary large objects) such as documents, videos, images, and backups. |
Suitable for applications that require efficient, scalable storage for large amounts of unstructured data, including content delivery, data archiving, and big data analytics. |
|
File storage |
File storage provides fully managed file shares in the cloud via the industry-standard SMB protocol. |
This solution is best for scenarios where applications need shared storage accessible from multiple virtual machines, on-premises deployments, and Azure services. |
|
Queue storage |
Queue storage is designed to store large numbers of messages that can be accessed from anywhere via authenticated calls using HTTP or HTTPS. |
Useful for decoupling application components, where one component generates requests, and another processes them asynchronously. Commonly used in messaging and task processing scenarios. |
|
Table storage |
Table storage provides a NoSQL key-value store for rapid development and fast access to large amounts of unstructured data. |
Ideal for applications requiring a schema-less design, such as web applications, user data storage, and metadata storage for structured and semi-structured data. |
Azure Storage pricing highly depends on the storage tier, data redundancy options, and access patterns.
By understanding these factors and choosing the appropriate options for your data, you can optimize costs while ensuring that your storage solution meets your performance and accessibility needs.
We’ll first discuss the most critical factors that affect pricing for storage accounts in Azure. Then, we’ll dive deeper into two important options affecting performance and pricing: the access tiers and the data redundancy options.
Azure Storage pricing is influenced by several factors, including:
Azure Storage offers four access tiers: hot, cool, cold, and archive. Choosing the proper access tier for your access patterns helps optimize costs.
Here’s an overview of the different tiers, cost and use cases:
|
Overview |
Cost |
Use cases | |
|
Archive tier |
Optimized for data that is rarely accessed and stored for at least 180 days |
Lowest storage costs but highest retrieval costs and latency |
Best for data that is rarely needed, such as long-term archival storage, compliance, and historical data retention |
|
Cold tier |
Optimized for data that is infrequently accessed and stored for at least 90 days |
Higher storage costs than the archive tier but lower retrieval costs and latency |
Best for older data that isn’t used frequently but is expected to be available for immediate access |
|
Cool tier |
Optimized for data that is infrequently accessed and stored for at least 30 days |
Higher storage costs compared to the cold tier but lower access and transaction costs |
Suitable for data that is not accessed regularly but needs to be available when needed, such as backups, disaster recovery data, and long-term business data storage |
|
Hot tier |
Optimized for data that is accessed frequently |
Highest storage costs but lowest access and transaction costs |
Ideal for data that requires fast, frequent access, such as active datasets, user files, and live applications |
Data redundancy in Azure refers to replicating data across different locations to ensure its durability, availability, and accessibility, even during hardware failures, network issues, or disasters.
Each redundancy option offers different levels of protection, availability, and cost. These options ensure your data is safe and can be recovered or accessed from alternative locations when necessary.
The following table sorts the different options from low cost to high cost:
|
Overview |
Use cases | |
|
Locally redundant storage (LRS) |
LRS replicates your data three times within a single data center in a region |
Suitable for scenarios where data loss can be tolerated, but high availability within a single region is needed |
|
Zone-redundant storage (ZRS) |
ZRS replicates your data synchronously across three storage clusters in a single region, each located in different availability zones |
Suitable for scenarios requiring high availability and durability within a region, protecting against data center-level failures |
|
Geo-redundant storage (GRS) |
GRS replicates your data to a secondary region hundreds of miles from the primary location. It combines LRS in the primary region and asynchronous replication to the secondary region |
Suitable for disaster recovery scenarios where data needs to be protected against regional outages |
|
Geo-zone-redundant storage (GZRS) |
GZRS combines the benefits of ZRS and GRS. It synchronously replicates data across three Azure availability zones in the primary region and asynchronously replicates it to a secondary geographic region. |
Suitable for mission-critical applications requiring high availability, durability, and disaster recovery capabilities |
If you’re interested in more in-depth knowledge about Azure, check out the Azure Architecture and Services course.
In addition to choosing the right options for your storage account, lifecycle management in Azure storage allows you to automate data movement between different access tiers to optimize costs.
Here's how to set up policies for automated data movement:

The lifecycle management overview screen of a storage account. Image by author
1. Go to your storage account in the Azure portal. Under the “Data management” section, select “Lifecycle management.”
2. Click on “Add rule” to create a new lifecycle management policy. Provide a name for the rule and specify the conditions under which the rule should apply.
3. Define conditions and actions:
4. Review the rule settings and save the policy. Based on the defined conditions, the policy will automatically apply to the blobs in the storage account.
Here are some common scenarios data teams may encounter and possible lifecycle management strategies for each.
1. Compliance and retention:
2. Application data:
3. Development and testing data:
Azure Storage accounts offer scalable, secure, and flexible data storage options. In this tutorial, we discussed how to create, manage, and optimize storage accounts using Azure Portal, PowerShell, and Azure CLI. We also covered advanced configuration options, pricing, and cost-saving strategies.
If you’d like to learn more about the fundamental capabilities of Azure, check out DataCamp’s Azure Fundamentals track.
You can use Terraform to create and manage Azure Storage Accounts as part of your infrastructure-as-code strategy. Terraform allows you to define your cloud resources in a declarative configuration file, which makes it easier to automate and manage infrastructure at scale. By using Terraform, you can ensure that your Azure Storage Accounts and other resources are consistently deployed and configured according to your specifications, and it also enables version control and collaboration across teams.
Access keys are crucial for authenticating and accessing your Azure Storage Account data. You can obtain these keys through the Azure Portal, where you can navigate to your storage account and find the keys under the "Access keys" section. These keys provide programmatic access to your storage account, so it's important to handle them securely and rotate them periodically to maintain security. Additionally, you can use shared access signatures (SAS) as a more granular and secure method of granting temporary access to your storage resources.
You can change the performance tier and redundancy option after creating your Azure Storage Account. To do this, navigate to your storage account settings in the Azure Portal and update the performance tier or redundancy setting under the relevant section. Keep in mind that changing these options may temporarily affect access to your data and, depending on the changes, could incur additional costs.
To secure data in an Azure Storage Account, consider the following best practices:
Azure Monitor allows you to monitor the performance and usage of your Azure Storage Account. It provides transaction rates, latency, and capacity utilization metrics. Additionally, you can set up alerts to notify you of unusual activity or when usage thresholds are exceeded. Logs and diagnostic data can also be collected for more detailed analysis.
Anneleen is a data scientist with a background in statistics and social sciences. She currently works as a freelance data scientist in finance and is studying a postgraduate degree in Applied AI. Anneleen is the instructor of four DataCamp courses including 'Azure Management and Governance'.
Samouczek
Samouczek
Samouczek
Learn more about Azure and cloud computing with these courses!
Kurs
Opanuj Azure Management i Governance dzięki naszemu kompleksowemu kursowi, idealnemu dla specjalistów danych szukających wiedzy o chmurze.
Kurs
Nietechniczne wprowadzenie do cloud computing, obejmujące kluczowe pojęcia, terminologię i narzędzia.
Kurs
Ten kurs zagłębia się w fundamenty Azure, omawiając kontenery, maszyny wirtualne i wiele więcej.
Azure Storage forms the backbone of Microsoft’s Azure cloud platform, enabling users to store huge amounts of data securely, reliably, and cost-effectively. It supports various formats, including files, disks, messages, and structured and unstructured data.
Additionally, Azure Storage is highly scalable and integrates with other Azure services, such as the Azure Machine Learning platform.
The purpose of this tutorial is to provide a guide to creating and managing a Storage Account in Azure. By the end of this tutorial, you will be equipped with the knowledge to set up and configure an Azure Storage Account, manage your data effectively, and understand best practices for maintaining and securing Storage Accounts.
Prerequisites
Before diving into the creation and management of an Azure Storage Account, there are a couple of prerequisites to ensure a smooth experience:
If you need help setting up your account and want to learn the basics of Azure Portal, check out this guide to setting up and configuring Azure.