- Mais recentes
- Mais votos
- Mais comentários
The error you're encountering suggests that there might be some limitations or differences in how IAM authentication is implemented in DocumentDB Elastic compared to the standard DocumentDB.
For DocumentDB Elastic clusters, the process of creating IAM users might be different. Instead of using the $external database, you may need to create the IAM user directly in the database where you want to grant permissions.
Try the following approach:
-
Connect to your cluster as you did before.
-
Switch to the database where you want to grant permissions (in your case, "conntestdb"):
use conntestdb -
Then create the user with the IAM role:
db.createUser( { user: "arn:aws:iam::396604158966:role/docdb_conntest_role", mechanisms: ["MONGODB-AWS"], roles: [ { role: "dbOwner", db: "conntestdb" } ] } )
If this doesn't work, you might need to consult the specific documentation for DocumentDB Elastic or contact AWS support, as the IAM authentication process might differ from the standard DocumentDB implementation.
Also, ensure that:
- Your IAM role has the necessary permissions to access the DocumentDB cluster.
- The cluster's security group allows incoming connections from your IP address.
- You're using the latest version of the MongoDB shell that's compatible with DocumentDB Elastic.
If you continue to face issues, you may want to try using the AWS CLI or SDK to manage IAM authentication for your DocumentDB Elastic cluster, as these methods might be more reliably supported.
Sources
Authentication using IAM identity - Amazon DocumentDB
Managing Amazon DocumentDB users - Amazon DocumentDB
Conteúdo relevante
- feita há 2 meses
- feita há 2 meses
- AWS OFICIALAtualizada há um mês
