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
- An Azure subscription. If you don't have one, you can create a free account.
- Access to the Azure portal.
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
- 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.
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: