Perform an Offline Migration of a MongoDB Instance to Amazon DocumentDB

30 minutes
  • 4 Learning Objectives

About this Hands-on Lab

In this lab, you will perform an offline migration of a MongoDB database to an Amazon DocumentDB cluster. After completing this lab, you will have hands-on experience with performing an offline migration using the `mongodump` and `mongorestore` commands.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Dump the Collection Data

Dump the collection named library from the source MongoDB instance at mongodb://

Create the Index

Create an index on the author field of the library database on the DocumentDB cluster.

Restore the Collection Data

Restore the collection data dumped from the source to the DocumentDB cluster.

Test the New Endpoint

Test the connection to the DocumentDB cluster, and provide the new endpoint to the application administrators.

Additional Resources

You are working as a database administrator (DBA) and have been tasked with migrating a test MongoDB database to Amazon DocumentDB. This is a small database, so you will be performing an offline migration. Once you have received word from the application administrators that all writes to the source MongoDB database have been stopped, you can proceed with the following tasks:

  • Dump the collection data.
  • Create the indexes.
  • Restore the collection data.
  • Test the new endpoint.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?