** Context: ** DocumentDB has no public endpoints and lives in its own VPC, the upshot of which is that to interact with the data (ie get a shell) you must tunnel/hop through an EC2 instance in the same VPC as the DocumentDB cluster
- SSH to the instance
- Follow instructions here: https://docs.aws.amazon.com/documentdb/latest/developerguide/getting-started.connect.html
Important: you need rds-combined-ca-bundle.pem on the instance, which is listed in instructions above
Enter the following command (swap out URL and username & password)
$ mongo --ssl --host your-docdb-2035-01-02-03-04-05.cluster-abcdefghijk123.us-west-2.docdb.amazonaws.com:27017 --sslCAFile rds-combined-ca-bundle.pem --username USER_NAME_HERE --password PASSWORD_HERE$ show dbs #should see a database named "documentdb"
$ use documentdb
$ show collections # should show only one collection named "events"
$ db.events.find() # dump everything on screen
$ exit # Kill your session$ exit