Getting Started with Azure Blob Storage

Welcome to the Azure Blob Storage getting started guide. Azure Blob Storage is Microsoft's massively scalable object storage solution for the cloud. It's optimized for storing large amounts of unstructured data, such as text or binary data.

What is Azure Blob Storage?

Blob storage is designed for:

Key Concepts

Steps to Get Started

Step 1: Create an Azure Storage Account

To use Azure Blob Storage, you first need a storage account. You can create one through the Azure portal, Azure CLI, or PowerShell.

Using Azure Portal:

  1. Sign in to the Azure portal.
  2. Navigate to "Storage accounts" and click "Create".
  3. Fill in the required details (Subscription, Resource group, Storage account name, Region, etc.).
  4. Select "Standard performance" and "General-purpose v2" for most use cases.
  5. Review and create the storage account.

For command-line creation, you can use:

az storage account create \
    --name mystorageaccountname \
    --resource-group myresourcegroup \
    --location westus \
    --sku Standard_LRS

Step 2: Create a Container

Blobs are organized into containers. Create a container within your storage account to hold your blobs.

Using Azure Portal:

  1. In your storage account, navigate to "Containers".
  2. Click "+ Container".
  3. Provide a unique name for your container (e.g., my-images) and set the public access level.
  4. Click "Create".

Using Azure CLI:

az storage container create \
    --name my-images \
    --account-name mystorageaccountname

Step 3: Upload a Blob

You can upload files to your container using various methods, including the Azure portal, Azure Storage Explorer, SDKs, or the Azure CLI.

Using Azure Portal:

  1. Navigate to your container.
  2. Click "Upload".
  3. Select the file(s) you wish to upload.

Using Azure CLI:

az storage blob upload \
    --container-name my-images \
    --file /path/to/your/local/image.jpg \
    --name image.jpg \
    --account-name mystorageaccountname

Step 4: Access Your Blob

Once uploaded, you can access your blobs. The access method depends on the container's public access level.

If the container is public, you can access blobs using their URL:

https://mystorageaccountname.blob.core.windows.net/my-images/image.jpg

For private containers, you'll need to use authentication (e.g., Shared Access Signatures (SAS) or account keys) when accessing blobs via SDKs or APIs.

Next Steps

This guide provides a basic introduction. To further explore Azure Blob Storage, consider:

Explore More Azure Blob Storage Features