Connection from K8S pod by mongosh to MongoDB Atlas

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?

P.S. Base image for pod: Ubuntu 20.04 and 22.04
Also I tried another version of mongosh (2.2.15)

I found, that authentication works fine on version 2.1.5, but is broken on 2.2.0

I have the same problem, only mine says
MongoAWSError: Missing internal module ‘./502.mongosh.js’

I have no idea how to install an earlier version of mongosh, it doesn’t seem available