Get Started with Azure Cosmos DB: Create an Account

This guide will walk you through the process of creating your first Azure Cosmos DB account using the Azure portal.

Azure Cosmos DB is a globally distributed, multi-model database service. It enables you to create and query NoSQL databases with global distribution and horizontal scalability.

Prerequisites

Steps to Create a Cosmos DB Account

  1. Sign in to the Azure portal

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

  2. Create a resource

    In the Azure portal, select + Create a resource from the top left corner.

    Azure Portal Create Resource Button

    The exact location of this button might vary slightly based on portal updates.

  3. Search for Azure Cosmos DB

    In the search bar of the "Create a resource" page, type "Azure Cosmos DB" and select it from the search results.

  4. Configure your Cosmos DB account

    Click the Create button under Azure Cosmos DB. You will be presented with several options. For this guide, we'll focus on the core settings for a new account:

    Basic tab

    • Subscription: Select the Azure subscription you want to use.
    • Resource group: Choose an existing resource group or create a new one. A resource group is a logical container for your Azure resources.
    • Account name: Enter a unique name for your Cosmos DB account. This name will be part of your database endpoint (e.g., yourcosmosdbaccount.documents.azure.com).
    • API: Choose an API. Common choices include:
      • Core (SQL): The default and most flexible API for document data.
      • MongoDB: For MongoDB workloads.
      • Cassandra: For Cassandra workloads.
      • Table: For key-value data.
      • Graph: For graph data.
      For beginners, Core (SQL) is recommended.
    • Location: Select the Azure region where you want to deploy your account.

    For detailed settings like capacity mode (provisioned throughput vs. serverless) and replication, you can explore the other tabs (e.g., "Capacity mode," "Networking," "Backup policy"). For a quick start, default options are often sufficient.

    Azure Cosmos DB Create Form Basics
  5. Review and Create

    Click the Review + create button. Azure will validate your configuration.

    Once validation passes, review the summary of your settings and click the Create button.

    Azure Cosmos DB Create Form Review and Create
  6. Deployment

    The deployment process will take a few minutes. You can monitor the progress via the notification icon in the top right corner of the portal.

    Once the deployment is complete, click Go to resource.

Congratulations! You have successfully created an Azure Cosmos DB account. You can now proceed to create databases, containers, and add data.

Next Steps