I try to connect to the mion cluster DocumentDB on AWS from AWS C9 with this tutorial. But every time I try to connect I get connection failed after 6 attempts:
(scr_env) me:~/environment/sephora $ mongo --ssl --host xxxxxxxxxxxxx:xxxxx --sslCAFile rds-combined-ca-bundle.pem --username username --password mypassword
MongoDB shell version v3.6.3
connecting to: mongodb://xxxxxxxxxxxxx:xxxxx/
2022-03-22T23:12:38.725+0000 W NETWORK [thread1] Failed to connect to xxx.xx.xx.xxx:xxxxx after 5000ms milliseconds, giving up.
2022-03-22T23:12:38.726+0000 E QUERY [thread1] Error: couldn't connect to server xxxxxxxxxxxxx:xxxxx, connection attempt failed :
connect@src/mongo/shell/mongo.js:251:13
@(connect):1:6
exception: connect failed
Indeed it seems to be missing the VPC configuration. So I tried to do with this documentation. But I do not know how to install the mongo shell on my AWS Cloud9. Indeed, it seems that I cannot create the repository file with the echo -e "[mongodb-org-4.0] \name=MongoDB repository baseurl=...
.
returns: mongodb-org-4.0.repo: No such file or directory
.
Also, when I tried to install the mongo shell with sudo yum install -y mongodb-org-shell
which I did not have, and which I installed, it returns repolist 0
.