Migrating from MongoDB to Amazon DocumentDB - Database Migration Guide
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Migrating from MongoDB to Amazon DocumentDB

Use the following tutorial to guide you through the process of migrating from MongoDB to Amazon DocumentDB (with MongoDB compatibility). In this tutorial, you do the following:

  • Install MongoDB on an Amazon EC2 instance.

  • Populate MongoDB with sample data.

  • Create an Amazon DMS replication instance, a source endpoint (for MongoDB), and a target endpoint (for Amazon DocumentDB).

  • Run an Amazon DMS task to migrate the data from the source endpoint to the target endpoint.


Before you begin, make sure to launch an Amazon DocumentDB cluster in your default virtual private cloud (VPC). For more information, see Getting started in the Amazon DocumentDB Developer Guide.

To estimate what it will cost to run this walkthrough on Amazon, you can use the Amazon Pricing Calculator. For more information, see https://calculator.aws/.