hands-on lab

Deploy a MongoDB Solution With Amazon DocumentDB

Up to 1h
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.


In a world where data is growing rapidly and is considered the new gold, you must be able to work with it and provide the most appropriate solutions based on the data you are working with. Nowadays there are a lot of data sources to work with, and corresponding formats. One of the most efficient ways to handle data is by structuring them and then using an RDBMS to handle them; but, because of the variety of data sources and application types, it's not always appropriate to structure data. Sometimes you should work with semi-structured and/or unstructured data.

In these cases, you can have a non-strict schema (free-form data) or you don't have a schema (schema-less data), so you need to implement a solution that could work with that type of data. Amazon DocumentDB is a fully managed, fast, and scalable DBMS that allows you to deploy a MongoDB compatible cluster, so you can store, retrieve and work with data represented as JSON documents.

In this lab, you will create an Amazon DocumentDB cluster along with a security group to restrict access to allowed resources. You will connect to the cluster and perform some DB operations using the mongo shell.

Lab Objectives

Upon completion of this Lab you will be able to:

  • Deploying an Amazon DocumentDB cluster
  • Connecting to a DocumentDB cluster and performing operations

Intended Audience

This lab is intended for:

  • Cloud architects that need to deploy a MongoDB compatible cloud solution
  • Data engineers that want to work with semi-structured and unstructured data leveraging an AWS solution


No prerequisite is required.


September 28th, 2021 - Clarified some instructions and applied a minor fix to last lab step

Environment before

Environment after

About the author

Learning paths

Stefano studies Computer Science and is passionate about technology. He loves working with Cloud services and learning all the best practices for them. Google Cloud Platform and Amazon Web Services are the cloud providers he prefers. He is a Google Cloud Certified Associate Cloud Engineer. Node.js is the programming language he always uses to code. When he's not involved in studying or working, Stefano loves riding his motorbike and exploring new places.

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Creating an Amazon DocumentDB Subnet Group
Setting up Security Group Rules for Connecting to the DocumentDB Cluster
Deploying an Amazon DocumentDB Cluster
Starting an AWS Systems Manager Session Manager Browser Shell Session
Performing Simple MongoDB Operations