Azure Storage: Cosmos DB

Create an Azure Cosmos DB Account

This guide will walk you through the steps to create a new Azure Cosmos DB account using the Azure portal. Azure Cosmos DB is a globally distributed, multi-model database service.

Prerequisites: An active Azure subscription is required. If you don't have one, you can create a free account.

Steps to Create an Account:

Step 1: Navigate to the Azure Portal

Open your web browser and navigate to the Azure portal. Sign in with your Azure account credentials.

Azure Portal Login Screen
Step 2: Create a Resource

On the Azure portal dashboard, click on the + Create a resource button, usually found at the top left corner.

Create Resource Button
Step 3: Search for Azure Cosmos DB

In the "Search the marketplace" bar, type Azure Cosmos DB and select it from the search results.

Search for Azure Cosmos DB
Step 4: Select "Create"

On the Azure Cosmos DB overview page, click the Create button.

Cosmos DB Create Button
Step 5: Configure the Basics Tab

You'll be presented with several configuration tabs. Start with the Basics tab:

  • Subscription: Select the Azure subscription to use for the account.
  • Resource group: Select an existing resource group or create a new one (e.g., myCosmosDBResourceGroup).
  • Account name: Enter a globally unique name for your Cosmos DB account (e.g., mycosmosdbaccount12345). This name will be part of the endpoint URL.
  • Region: Choose the Azure region where you want to deploy your account. Select a region close to your users or applications for lower latency.
  • Capacity mode: Choose between Provisioned throughput (manual or autoscale) and Serverless. For new projects, autoscale is often a good choice.
  • API: Select the API you want to use (e.g., Core (SQL), MongoDB, Cassandra, Gremlin, Table). Core (SQL) is the default and most common.
Cosmos DB Basics Configuration
Step 6: Configure Additional Tabs (Optional)

Depending on your needs, you can configure settings in the following tabs:

  • Global Distribution: Configure multi-region writes and disaster recovery.
  • Networking: Set up private endpoints or configure firewall rules.
  • Backup Policy: Configure continuous or periodic backups.
  • Encryption: Manage encryption keys.
  • Tags: Apply tags for organization and management.

For most basic scenarios, the default settings in these tabs are sufficient to get started.

Step 7: Review and Create

After filling out the necessary information, click on the Review + create button. Azure will validate your configuration.

Cosmos DB Review + Create

Review the summary of your settings. If everything looks correct, click the Create button.

Cosmos DB Final Create Button
Step 8: Deployment

The deployment process will begin. It typically takes a few minutes for the Cosmos DB account to be provisioned.

Once the deployment is complete, you will see a "Your deployment is complete" message.

Cosmos DB Deployment Complete

Click on Go to resource to access your newly created Azure Cosmos DB account.

What's Next? After creating your account, you can create databases, containers (collections), and start adding data. Explore the Data Explorer in the Azure portal for easy management.

Create Cosmos DB Account Now