In your migration task console, verify that new records are inserted, in addition to full load.
If you see only full load but don’t see any ‘Inserts’ yet, it means the MongoDB source database hasn’t received insert jobs yet from the Lambda function scheduled to insert records every 5 minutes. Click on the refresh icon until you see some records inserted, which gives you visibility to the records inserted in your MongoDB and migrated to Amazon DocumentDB via AWS DMS.
If you are still logged into your DocumentDB cluster via Cloud9 and are at the RS0:PRIMARY> prompt, skip to the “View the collections” step below. Otherwise, follow these steps to log in to your DocumentDB cluster:
Go to the AWS Cloud 9 Console
Click on Open the IDE.
Note: the next command requires the OS variables: docdbEndpoint, username, password, all having been set previously. Refer to 2.2.2 Connect to the DocumentDB cluster if needed.
Log into your Amazon DocumentDB cluster:
mongo --ssl --host $docdbEndpoint:27017 --sslCAFile rds-combined-ca-bundle.pem --username $username --password $password
View the collections:
use labdb show collections
You should see
locations collections from
Now count records from the collections.
The count results vary from what is on the screen shot depending on how long the Lambda function that generates data has been up and running in your environment.
As an optional exercise, you may log into the MongoDB source and use the same commands above to count the records in the source collections to compare. It is important to understand that the MongoDB source is having new records inserted by the Lambda function so some small difference in counts is likely depending on when the records are inserted, transferred via DMS to DocumentDB, and counted.
That completes the Migration lab! If you are done with labs and you are using your own AWS account then go to Clean up to delete resources created in the workshop.