Testing MongoDB - MongoDB on AWS

Testing MongoDB

After the AWS CloudFormation template has completed successfully, the system will have a mongodb instance running on each of the primary replica set nodes. To validate the system and verify the configuration, follow these steps:

  1. From the bastion host, use SSH to log in to one of the primary instances created by the Quick Start template:

    ssh ec2-user@<Primary-MongoDB-Instance>
  2. Execute the following commands from the terminal:

    mongo use admin db.auth("admin", "YourAdminPassword") rs.printReplicationInfo() rs.status()
  3. Verify that the mongo shell connects to the local host on the default TCP port (27017), and that the output reflects the configuration that you specified for the Quick Start template.

For additional information on testing the MongoDB server, see the MongoDB documentation.