Get Started with Azure Blob Storage

Welcome to Azure Blob Storage! This guide will walk you through the fundamental steps to start using Blob Storage, from creating a storage account to uploading your first blob.

Prerequisites:

1. Create a Storage Account

A storage account provides a unique namespace in Azure for your data. All objects in Azure Storage are contained within a storage account.

Using the Azure Portal:

  1. Navigate to the Azure portal and sign in.
  2. In the portal menu, select Create a resource.
  3. Search for Storage account and select it.
  4. Click Create.
  5. Fill in the required fields:
    • Subscription: Select your Azure subscription.
    • Resource group: Create a new one or select an existing one.
    • Storage account name: Choose a globally unique name (lowercase letters and numbers).
    • Region: Select the desired Azure region.
    • Performance: Choose Standard or Premium.
    • Redundancy: Select a redundancy option (e.g., LRS, GRS).
  6. Click Review + create and then Create.

2. Understand Storage Concepts

Before you proceed, it's helpful to understand a few key concepts:

3. Upload Your First Blob

You can upload blobs using various methods. Here's a simple example using the Azure portal.

  1. Once your storage account is created, navigate to its resource page in the Azure portal.
  2. In the left-hand menu, under Data storage, select Containers.
  3. Click + Container.
  4. Enter a name for your container (e.g., myblobcontainer) and set the public access level (typically Private for most scenarios).
  5. Click Create.
  6. Click on the container name you just created.
  7. Click the Upload button.
  8. Select the file you want to upload from your local machine.
  9. You can optionally specify blob name, access tier, and other advanced options.
  10. Click Upload.
Tip: For programmatic uploads, consider using the Azure Storage SDKs for your preferred programming language or the Azure CLI.

4. Accessing Your Blob

After uploading, you can access your blob through:

Example using Azure CLI:

Make sure you have the Azure CLI installed and logged in.

# Upload a file to a blob
az storage blob upload --account-name <YOUR_STORAGE_ACCOUNT_NAME> --container-name <YOUR_CONTAINER_NAME> --name <BLOB_NAME> --file <LOCAL_FILE_PATH> --auth-mode login

# Download a blob
az storage blob download --account-name <YOUR_STORAGE_ACCOUNT_NAME> --container-name <YOUR_CONTAINER_NAME> --name <BLOB_NAME> --file <LOCAL_DESTINATION_PATH> --auth-mode login

Next Steps

View All Blob Storage Topics