Hi,
I’ve successfully connected my application to MongoDB Atlas cluster from AWS-EKS using method described here: https://www.mongodb.com/docs/atlas/security/passwordless-authentication/#aws-eks
After some time the application fails with com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=MONGODB-AWS, userName='BLABLABLA', source='$external', password=<hidden>, mechanismProperties=<hidden>}
when doing operations against Mongo.
Probably because it’s only a temporary client session. The IAM role has a maximum session duration of 1 hour. It seems it’s a bit random how long it takes before this MongoSecurityException kicks in.
Anyone has any experience with this and a recommended approach to solve this…? Haven’t found anything regarding this yet.