-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 5.7.0, 6.0.0
-
Component/s: Authentication
Use Case
As an AWS authentication user
I want to control the region where the STS Client sends its requests
So that I can reduce latency for my application
Reference
User Impact
- Currently us-east-1 is always used when fromNodeProviderChain is invoked (the aws-sdk credential provider API).
- AWS_REGION environment variable if defined will be used for the STS region setting
Dependencies
- None
Unknowns
- Are there sources for region other than env?
- Yes, there are well-known config ini files with region information. However, supporting those has added complexity of distinguishing multiple profiles so we will defer support for the time being.
Acceptance Criteria
Implementation Requirements
- Using a non-zero length AWS_REGION from process.env
- Pass the value to `clientConfig:
{ region }
` where we call fromNodeProviderChain
- Fix in v5 and v6
Testing Requirements
- Reuse the AWS testing we have, add a test that connects to MongoDB while AWS_REGION is set and validate the http request is routed to the correct region
Documentation Requirements
- Update https://www.mongodb.com/docs/atlas/manage-connections-aws-lambda/#connection-example to mention the AWS_REGION controls.
Follow Up Requirements
- None
- is related to
-
DRIVERS-2696 Add a programmatic option to control AWS region settings
- Backlog
-
NODE-5567 Enable configuration of AWS credentials provider
- Closed