DataGrip + AWS DocumentDB - How To? Follow
How do you connect DataGrip to a AWS DocumentDB (mongoDB)? Using the MongoDB driver I'm able to specify the connection and the test connect is successful but when DataGrip tries to load the schema I'm getting a `Null Pointer Exception`.
Since DocumentDB uses the older API of MongoDB I'm assuming there's some parameter or something to tell DataGrip how to connect to it?
Please sign in to leave a comment.
I am seeing exactly the same behavior.
A console connection with mongo, as explained in the AWS documentation, works fine:
`mongo --ssl --host aws-host...amazon.com:27017 --sslCAFile rds-combined-ca-bundle.pem --username root --password <insertYourPassword>`
On Pycharm 2020.1, by using the same certificate in the `CA File` of the SSH/SSL tab, with the `Use SSL` checkbox cheked, and after a while, I get the Null Pointer exception
Same here I did not manage to get it to work and would love it if this would work.
I'm having the same issue, can't connect to my AmazonDB cluster using DataGrip please help
Carlosd Dev try updating your mongo driver, with 1.8.3 version this was fixed.
I'm using driver 1.8.3 and trying to connect to AWS DocumentDB through an EC2 machine acting as SSH tunnel, but still didn't succeed in connecting. Anyone else got this working?
You need to download the .pem, wget https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
Enable the checkbox for "Use SSL" and then point that to your .pem file location. Nothing else needs to be set under SSL for this to work.
PS: SSH tunnelling is a PITA. Ask your devops/infra/platf-eng/etc team to setup a proper VPN into the VPC using VPN endpoints. https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-endpoints.html . I also think AWS choosing .pem as an extension for a CA is rather peculiar because it can contain a secret or private key.
Make sure the use the latest MongDB driver (4.4.4 in my case) as I was also having issues and after JetBrains support checked, it appeared to be caused by older version of the driver
In general, you need SSH jump host (any EC2 instance), set up SSH tunnel and SSL for proper connection.
Just let me know if you need further assistance.