You can use AWS Database Migration Service (DMS) to migrate data to Amazon DocumentDB (with MongoDB compatibility) from any of the source data engines that AWS Database Migration Service (DMS) supports. The source engine can be on an Amazon-managed service such as Amazon RDS, Aurora, or Amazon S3. Alternatively, the engine can be on a self-managed database, such as MongoDB running on on-premises or Amazon EC2.
Create target endpoint:
Download the Certificate, open the following url in your browser and
Save the file
Save it to your Downloads folder.
To get your cluster hostname, go to your Amazon DocumentDB Cluster page.
DMS Target Endpoint Parameters:
< you cluster endpoint >
Add new CA certificate
<the username used in Introduction Module>, or
labUserif you did not complete Introduction Module
Tim3t0changeis the default if created via Cloudformation)
After successful connection, Create the endpoint.
Check the endpoints created.
Now you can create a Migration Task from MongoDB to DocumentDB.