Cloud Academy

Developing with the Cosmos DB Core (SQL) API and Change Feed

Lab Steps

Logging into the Microsoft Azure Portal
Creating an Azure Cosmos DB SQL Database in the Azure Portal
Creating a Cosmos DB SQL Container
Inserting and Viewing Data with the Cosmos DB SQL API
Editing and Deleting Data with the Cosmos DB SQL Data Explorer
Learning about Consistency in Cosmos DB
Triggering an Azure Function With Cosmos DB SQL Changes
Testing the Azure Function Cosmos DB SQL Trigger

The hands-on lab is part of these learning paths

AZ-204 Exam Preparation: Developing Solutions for Microsoft Azure
course-steps 15 certification 1 lab-steps 8
DP-201 Exam Preparation: Designing an Azure Data Solution
course-steps 11 certification 1 lab-steps 4
DP-200 Exam Preparation: Implementing an Azure Data Solution
course-steps 11 certification 1 lab-steps 4
more_horiz See 1 more

Ready for the real environment experience?

Time Limit1h 30m
star star star star star-half


Azure Cosmos DB is a fully-managed, globally-distributed, multi-model database. Databases in Cosmos DB are enterprise-ready and highly-available offering up to 99.999% availability SLA. In this Lab, you will learn how to manage Cosmos DB using the Azure Portal and Azure CLI as you integrate Azure Functions with Cosmos DB change feed triggers to buy and sell fictitious stocks. This lab uses the SQL API in Cosmos DB to work with a document database model.

Lab Objectives

Upon completion of this lab you will be able to:

  • Understand the multi-model capabilities of Cosmos DB
  • Perform geo-replication and failovers in Cosmos DB
  • Understand the tradeoffs involved in deciding on a concurrency model and throughput level in Cosmos DB
  • Connect to and work with SQL API Cosmos DB databases using the Azure Portal

Intended Audience

This lab is intended for:

  • Prospective developers, data scientists and database engineers
  • Anyone who needs the ability to store, edit and view data
  • Anyone interested in full-stack, backend or website development


You should be familiar with:

  • The concept of SQL and document databases


March 24th, 2020 - Updated instructions to avoid using the free tier discount which causes deployment of the database to fail.

Environment before
Environment after

About the Author

Learning paths1

Matt has worked for multiple Fortune 500 companies as a DevOps Engineer and Solutions Architect. He is an AWS Certified Solution Architect - Associate, AWS Certified SysOps Administrator - Associate and an AWS Certified Developer - Associate. He enjoys reading and learning new technologies.