I'm totally new to Amazon DocumentDB and have a question about connecting programmatically. I found a guide that shows how to connect with TLS, particularly for Node.js, which includes an example user and password. However, I want to connect using TLS with IAM authentication instead, but there's no example for that. How do I figure out how to do this? I've already enabled IAM authentication and prefer not to use the user/password method. I tried asking AI tools, but they just give confusing responses that aren't helpful.
2 Answers
You might want to check out the official AWS documentation on IAM authentication. It’s a bit different from the typical username/password methods. Take a look at the page on [IAM identity auth](https://docs.aws.amazon.com/documentdb/latest/developerguide/iam-identity-auth.html) for clear instructions and requirements. It gives details on how to set up users and roles which might help you connect securely!
If you have already set up IAM roles correctly and your users are added, make sure your connection string reflects that. Sometimes it helps to double-check the Amazon DocumentDB settings and ensure there's no mismatch between the configurations. Also, running a quick test to verify permissions can be useful to diagnose the issue.
Thanks for the tip! I think I have the roles and permissions in place, but I'm not sure I’m using the right client specific to DocumentDB. I’ll look into it!