Hands-On LabIntermediate

Deploy and Query Azure Cosmos DB with the NoSQL API

Create a serverless Cosmos DB account, build a database and container, insert and query documents, and explore consistency levels in this hands-on lab.

60 minEstimated time
5Guided steps
AutoVerification
IsolatedSandbox
Deploy and Query Azure Cosmos DB with the NoSQL API

Lab overview

Azure Cosmos DB is Microsoft's globally distributed, multi-model database service built for mission-critical workloads. Its NoSQL API lets you query JSON documents using familiar SQL-like syntax while delivering single-digit-millisecond latency and five tunable consistency levels — a combination no other managed database offers.

In this lab, you will deploy a Cosmos DB account in serverless mode, create a database and container with a thoughtful partition key, insert JSON documents, and write queries to filter, project, and sort your data. You will also configure indexing policies and explore the five consistency levels that make Cosmos DB unique. Each step frames a real architecture decision — not just a click-through — so you leave with the knowledge to design Cosmos DB solutions for production workloads.

Objectives

Upon completing this Intermediate level lab, you will be able to:

  • Create an Azure Cosmos DB account using the serverless capacity mode with the NoSQL API
  • Build a database and container with a well-designed partition key strategy
  • Insert JSON documents into a container using the Azure Portal Data Explorer
  • Write SQL-like queries to filter, project, and sort NoSQL documents
  • Configure an indexing policy to include and exclude specific document paths
  • Compare the five consistency levels and understand their trade-offs in a distributed system

Who is this lab for?

This lab is designed for:

  • Cloud engineers and developers learning Azure's flagship NoSQL database and wanting hands-on experience with Cosmos DB
  • Solutions architects evaluating Cosmos DB's consistency models and cost optimization strategies
  • Database administrators transitioning from relational databases to NoSQL and looking for a structured introduction

Verified against your live environment

An automated validation engine inspects your actual resources and configurations as you work. Completion means the task was performed — not multiple choice, real-world proficiency.

[CHECK] validation_activelive
Inspecting deployed resources...
Verifying configuration state...
✓ Step requirements satisfied

More labs like this

Related reading

PremiumIncluded in Premium
Duration
60 min
Steps
5

Environment

Live Cloud Environment

Every lab includes

  • Real environment, pre-credentialed
  • Automated checks on every step
  • Isolated sandbox, auto cleanup
  • AI-recommended next steps

Lab curriculum

  1. 01

    Logging into Azure Account using Azure Portal

  2. 02

    Create an Azure Cosmos DB Serverless Account with the NoSQL API

    1 automated check

  3. 03

    Build a Database and Container with a Partition Key

    1 automated check

  4. 04

    Insert and Query JSON Documents in Data Explorer

    1 automated check

  5. 05

    Configure Indexing Policies and Explore Consistency Levels

    1 automated check

Not the lab you were looking for?

Browse 150+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.

Explore the catalog