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. It enables you to work with data models such as document, key-value, graph, and column-family, all of which are supported by the same core API.

On this page

Prerequisites

Before you begin, you'll need an active Azure subscription. If you don't have one, you can create a free account.

You can find more information on Azure free services here: Azure Free Account.

Create the Cosmos DB account

Follow these steps to create your Azure Cosmos DB account:

1. Sign in to the Azure portal.

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

2. Search for Azure Cosmos DB.

In the Azure portal search bar at the top, type Azure Cosmos DB and select it from the search results.

3. Create a new Azure Cosmos DB account.

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

4. Configure the basic settings.
5. Configure networking (Optional).

Under the Networking tab, you can configure network access for your account. By default, public access is enabled. You can restrict access to specific virtual networks or IP addresses for enhanced security.

6. Review and create.

Click on the Review + create button. Azure will validate your configuration. Once validation passes, click Create.

Note: The creation process can take several minutes. You will see a notification in the Azure portal when the deployment is complete.

Verify the account creation

Once the deployment is finished, you can navigate to your newly created Azure Cosmos DB account:

  1. In the Azure portal, go to Resource groups.
  2. Select the resource group you specified during creation.
  3. Click on your newly created Azure Cosmos DB account name.

You should now see the overview page for your Cosmos DB account, including its endpoint, keys, and other settings.

Example using Azure CLI

You can also create an Azure Cosmos DB account using the Azure CLI. Here's an example:

az cosmosdb create --name my-cosmos-db-account --resource-group my-resource-group --kind GlobalDocumentDB --locations regionNames='[{"name":"West US"}]'

Replace my-cosmos-db-account and my-resource-group with your desired values.

Next Steps

Now that you have an Azure Cosmos DB account, you can start creating databases and containers. Here are some common next steps:

Tip: For cost optimization, consider using the autoscale provisioned throughput feature available in Azure Cosmos DB.