MSDN Documentation

Azure Cosmos DB: Create Account Tutorial

Welcome to this tutorial on creating your first Azure Cosmos DB account. Azure Cosmos DB is a globally distributed, multi-model database service that enables you to create and query document, key-value, and graph databases with ease.

Prerequisites

Steps to Create an Azure Cosmos DB Account

Step 1: Sign in to the Azure portal

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

Step 2: Create a new resource

On the Azure portal dashboard, click on the + Create a resource button. This is usually located in the top-left corner.

Alternatively, you can search for "Cosmos DB" in the search bar at the top of the portal and select it.

Step 3: Select Azure Cosmos DB

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

Click the Create button.

Step 4: Configure your Azure Cosmos DB account

You will be presented with a configuration page. Fill in the following details:

  • Subscription: Select your Azure subscription.
  • Resource group: Choose an existing resource group or create a new one by clicking Create new and providing a name.
  • Account name: Enter a unique name for your Azure Cosmos DB account. This name will be part of the URL for accessing your database. It must be globally unique.
  • API: Select the API that best suits your application's needs. Common options include:
    • Core (SQL) - for document data
    • MongoDB
    • Cassandra
    • Gremlin
    • Table
    For this tutorial, we'll select Core (SQL).
  • Location: Choose the Azure region where you want to deploy your Cosmos DB account. Select a region geographically close to your users for better performance.
  • Capacity mode:
    • Autoscale: Recommended for most workloads. Cosmos DB automatically scales throughput based on your usage.
    • Manual: You manually provision throughput.
    For this tutorial, select Autoscale.
Important Note: The account name must be globally unique. If your chosen name is already in use, you will need to select a different one.

Step 5: Review and Create

After filling in the details, click on the Review + create button at the bottom of the page.

Azure will validate your settings. Once validation passes, review the summary of your configuration.

Finally, click the Create button.

Step 6: Deployment

The deployment process will begin. This may take a few minutes.

You can monitor the deployment progress in the Azure portal's notifications area (the bell icon in the top-right corner).

Step 7: Access your Azure Cosmos DB account

Once the deployment is complete, click on Go to resource.

You are now on the overview page of your newly created Azure Cosmos DB account. From here, you can:

  • Create databases and containers.
  • Manage keys and connection strings.
  • Monitor performance and diagnostics.
  • Explore data.

Next Steps

Congratulations! You have successfully created your Azure Cosmos DB account. To continue your learning, consider exploring the following:

Remember to review the Azure Cosmos DB pricing to understand costs associated with your usage.