Home icon

A hybrid approach for homogeneous migration to an Amazon DocumentDB elastic cluster

Database Blog



This article provides a step-by-step guide on migrating a non-sharded MongoDB database to an Amazon DocumentDB elastic cluster using a hybrid approach.

Specifically, the article covers:

  • An overview of Amazon DocumentDB elastic clusters and their benefits for scalability
  • The hybrid migration approach, combining mongodump/mongorestore tools and AWS Database Migration Service (DMS)
  • Prerequisites for the migration, including setting up an EC2 instance, installing database tools, and enabling change streams on the source database
  • Using mongodump to export data from the source MongoDB database
  • Creating sharded collections in the target Amazon DocumentDB elastic cluster
  • Migrating indexes using the Amazon DocumentDB Index Tool
  • Restoring data to the target cluster using mongorestore
  • Setting up and running a parallel CDC task with AWS DMS to replicate ongoing changes
  • Monitoring the migration process and updating the application to use the new cluster
  • Conclusion and cleanup of resources used in the migration


Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Sep 5
2024
AWS DMS homogenous migration from document-oriented databases to Amazon DocumentDB
Nov 6
2025
Migrating Amazon DocumentDB Cluster across Regions: A step by step guide
Apr 16
2024
Scale write performance on Amazon DocumentDB elastic clusters
Apr 15
2024
Reduce cost and improve performance by migrating to Amazon DocumentDB 5.0

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.