Hello. I have a DB in mongodb Atlas, a k8s cluster in AWS, pod with installed mongosh 2.3.0 and assumed role, that has permissions for read/write to mongodb Atlas.
I need this functionality to automate some process with “dev” environment. In general I want to delete all data in one DB.
I want to use assumed role for authentication in mongodb Atlas.
When I try to connect and make backup from a pod with a mongodump - all is fine, when I try to connect to the same db from the same pod and run a command - I get an error:
MongoAWSError: Missing internal module './722.mongosh.js'
Command for backup:
mongodump --uri=“mongodb+srv://my_cluster_replica_set.mongodb.net/db_name?authSource=%24external&authMechanism=MONGODB-AWS” --archive=db_name.gz --gzip
Command for connect:
mongosh “mongodb+srv://my_cluster_replica_set.mongodb.net/?authSource=%24external&authMechanism=MONGODB-AWS” --eval “db.adminCommand({listDatabases: 1})”
Looks like there is some problem with authentication, but mongodump works fine.
Any ideas?