How can I connect to MongoDB using destination in ...
# ask-ai
r
How can I connect to MongoDB using destination in Fivetron. I have DocumentDB in AWS which I can access through EC2 instance using SSH. Which are the mandatory fields to give in destination MongoDB in Airbyte OSS? @kapa.ai
k
To use MongoDB (or Amazon DocumentDB) as a destination in Airbyte Open Source, you configure the MongoDB destination connector in the UI. From the docs, these are the required/mandatory fields for the MongoDB destination (Airbyte OSS) [[MongoDB dest getting started](https://docs.airbyte.com/integrations/destinations/mongodb#getting-started-airbyte-open-source); [MongoDB dest reference](https://docs.airbyte.com/integrations/destinations/mongodb#reference)]: 1. Authorization type - Chosen in the UI under
auth_type
(e.g., username/password). 2. MongoDB Instance Type -
Standalone MongoDB instance
,
Replica Set
, or
MongoDB Atlas Cluster
. [[MongoDB dest getting started](https://docs.airbyte.com/integrations/destinations/mongodb#getting-started-airbyte-open-source)] 3. Connection details (depend on instance type) - For Standalone MongoDB instance: - Host (URL of the database) - Port - TLS (whether to use encrypted connection) - For Replica Set: - Server addresses (members of the replica set) - Replica Set name - For MongoDB Atlas Cluster: - Cluster URL [[MongoDB dest getting started](https://docs.airbyte.com/integrations/destinations/mongodb#getting-started-airbyte-open-source)] 4. Database Name - The target database to store synced data. [[MongoDB dest getting started](https://docs.airbyte.com/integrations/destinations/mongodb#getting-started-airbyte-open-source); [MongoDB dest reference](https://docs.airbyte.com/integrations/destinations/mongodb#reference)] 5. Username and Password - A user that can create collections and write documents. [[MongoDB dest getting started](https://docs.airbyte.com/integrations/destinations/mongodb#getting-started-airbyte-open-source)] 6. SSH Tunnel Method (only if you must go via EC2) - Set
SSH Tunnel Method
to
SSH Key Authentication
or
Password Authentication
and then fill: - SSH jump server host (your EC2) - SSH port (usually 22) - SSH login username - SSH password or RSA private key (PEM) [[MongoDB dest getting started](https://docs.airbyte.com/integrations/destinations/mongodb#getting-started-airbyte-open-source)] Regarding Amazon DocumentDB via SSH: - The docs confirm that MongoDB sources have explicit TLS handling for DocumentDB, but they also state that the MongoDB source connector does not support custom SSL certificates, which DocumentDB requires [[MongoDB v2 troubleshooting](https://docs.airbyte.com/integrations/sources/mongodb-v2/mongodb-v2-troubleshooting#connector-limitations); [Forum post](https://discuss.airbyte.io/t/2501)]. - For the MongoDB destination, the docs do not explicitly mention support for custom CA certs or DocumentDB-specific TLS handling, so I cannot confirm that DocumentDB over TLS with a custom CA is fully supported as a destination. In practice, to try this from Airbyte OSS: 1. Configure your DocumentDB cluster to accept connections from the EC2 (bastion) host. 2. In Airbyte: - Create a MongoDB destination. - Choose the appropriate Instance Type (likely “Replica Set” or a standalone-like setup matching how DocumentDB is exposed). - Fill in host/port (DocumentDB endpoint and port), database, username, password, and TLS enabled. - Enable SSH Tunnel Method and point it to your EC2 instance with the correct SSH credentials. [[MongoDB dest getting started](https://docs.airbyte.com/integrations/destinations/mongodb#getting-started-airbyte-open-source)] Because the docs do not clearly state that custom CA certificates are supported for the MongoDB destination, there is a risk this may fail with SSL validation issues against DocumentDB; in that case, the current knowledge sources do not provide an official workaround.