Amazon DocumentDB with DBine

How to connect DBine to Amazon DocumentDB and what you can do once it's connected. This page is written from what the Amazon DocumentDB driver says about itself, so it matches the version of DBine you download.

Connect

  1. In DBine, open New connection.
  2. Pick Amazon DocumentDB in the list of engines.
  3. Fill in the fields below, press Test connection and then Save.

Default port: 27017.

General

FieldDescription
ServerSeveral members separated by commas: host1:27017,host2:27017.
Example: my-cluster.cluster-xxxx.us-east-1.docdb.amazonaws.com
Port
DatabaseInitial database; empty = the one in the connection string or “test”.
User
PasswordKept in the system keychain, never in DBine's files.
Connection stringIf filled in, it replaces the other fields.
Example: mongodb://user:password@cluster.docdb.amazonaws.com:27017/?tls=true&replicaSet=rs0&retryWrites=false
Kept in the system keychain, never in DBine's files.
Read-onlyOn or off.

SSH tunnel. The connection can go through an SSH server, even through a chain of bastions, with a password, a private key or the SSH agent. The server's fingerprint is checked against known_hosts or confirmed the first time.

SSL/TLS

FieldDescription
Encrypt the connection (TLS)On or off.
Trust the server certificateRequired if you connect through a tunnel (the certificate doesn't match localhost).
On or off.
AWS CA certificateThe Amazon RDS/DocumentDB CA bundle (global-bundle.pem), downloadable from the AWS documentation.
A file on this computer.
Example: global-bundle.pem

Advanced

FieldDescription
Authentication databaseExample: admin
Replica setrs0 to connect to the cluster; empty = direct connection to the instance (useful with an SSH tunnel).
Example: rs0

What the explorer shows

Under the connection: Databases. Inside each one:

Query editor

The editor uses Amazon DocumentDB's own query syntax, in JSON, with completion for the connection's objects. Statements and commands run against the database selected in the tab.

What the editor accepts:

mongosh-like syntax, one statement per line or separated with `;`:
db.collection.find({ age: { $gt: 30 } }, { name: 1 }).sort({ age: -1 }).limit(10)
db.collection.aggregate([{ $group: { _id: "$city", n: { $sum: 1 } } }])
db.collection.countDocuments({}) · db.collection.distinct("field", {})
db.collection.insertOne({…}) · updateMany(filter, { $set: {…} }) · deleteOne(filter)
db.getCollectionNames() · db.runCommand({ dbStats: 1 })
db.createCollection("c", { capped: true, size: 4096 }) · db.createView("v", "c", [{ $match: {} }])
db.getCollection("c").createIndex({ field: 1, date: -1 }, { unique: true }) · dropIndex("field_1") · db.dropDatabase()
DBine extension: db.createCollection("c", {…}, { ifNotExists: true }) does not fail if the collection already exists.
A raw JSON command is also accepted: { "find": "collection", "filter": {} }.
Unquoted keys, single quotes, ObjectId("…"), ISODate("…"), NumberLong(…) and /regex/i.

Ready-made templates for new objects:

Tools for Amazon DocumentDB

Available

  • Graphical execution plans
  • Live query profiler
  • Server monitor
  • Sessions and running queries
  • End a session
  • Locks: who blocks whom
  • Cancel another session's query from the sessions list
  • Index usage
  • Create databases
  • Drop databases
  • Database properties
  • Visual designer for new objects
  • Rename objects
  • Compare and sync schemas
  • Native bulk load when migrating data
  • Users and permissions

Not available for Amazon DocumentDB

  • Manual transactions (commit and rollback)
  • Relations in the ER diagram
  • Clone tables
  • Backups

Why a tool doesn't apply to an engine, and the details of each one, are in the engine support reference.

Generated from the Amazon DocumentDB driver 0.1.12, which DBine downloads the first time you connect to Amazon DocumentDB.

Download DBineAll engines