You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting in MongoDB version 4.11, when you install the optional
159
-
``aws-sdk/credential-providers`` dependency, the driver uses the AWS SDK
160
-
to retrieve credentials from the environment. As a result, if you
161
-
have a shared AWS credentials file or config file, the driver will
162
-
use those credentials by default.
163
-
164
-
You can override this behavior by performing one of the following
165
-
actions:
166
-
167
-
- Set ``AWS_SHARED_CREDENTIALS_FILE`` variable in your shell to point
168
-
to your credentials file.
169
-
- Set the equivalent environment variable in your application to point
170
-
to your credentials file.
171
-
- Create an AWS profile for your MongoDB credentials and set the
172
-
``AWS_PROFILE`` environment variable to that profile name.
156
+
Specifying AWS Credentials
157
+
--------------------------
158
+
159
+
When you install the optional ``aws-sdk/credential-providers`` dependency, the driver
160
+
retrieves credentials in a priority order defined by the AWS SDK. If you have a shared AWS
161
+
credentials file or config file, the driver uses those credentials by default.
162
+
163
+
.. tip::
164
+
165
+
To learn more about how the ``aws-sdk/credential-providers`` dependency retrieves
166
+
credentials, see the `AWS SDK documentation <https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-credential-providers/#fromnodeproviderchain>`__.
167
+
168
+
To manually specify the AWS credentials to retrieve, you can set the ``AWS_CREDENTIAL_PROVIDER``
169
+
property to a defined credential provider from the AWS SDK. The following example passes a provider chain
170
+
from the AWS SDK to the AWS authentication mechanism:
0 commit comments