-
Notifications
You must be signed in to change notification settings - Fork 855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update AWS_S3_USE_ARN_REGION to take precedence over value set i… #3513
base: v4-development
Are you sure you want to change the base?
Conversation
|
||
private bool forcePathStyle = false; | ||
private bool useAccelerateEndpoint = false; | ||
private S3UsEast1RegionalEndpointValue? s3UsEast1RegionalEndpointValue; | ||
private readonly string legacyUSEast1GlobalRegionSystemName = RegionEndpoint.USEast1.SystemName; | ||
|
||
private static CredentialProfileStoreChain credentialProfileChain = new CredentialProfileStoreChain(); | ||
private static CredentialProfileStoreChain credentialProfileChain = new CredentialProfileStoreChain(Environment.GetEnvironmentVariable(AwsConfigFileEnvName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to leaving this as is. We added support for AWS_CONFIG_FILE
a couple years ago and when this class was created, this environment variable wasn't available. Now that it is, it makes sense for the CredentialProfileStoreChain
to check this value to see if it should look somewhere else for the config file.
Given that the constructor accepts a ProfileLocation
, I thought it made sense to add it here. If it isn't set, then it will just continue to work as it did previously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer changing this in a separate PR, since there are other configs that need to fixed:
aws-sdk-net/sdk/src/Services/SecurityToken/Custom/AmazonSecurityTokenServiceConfig.Extension.cs
Line 80 in 694f26c
private static readonly CredentialProfileStoreChain _credentialProfileChain = new CredentialProfileStoreChain(); private static CredentialProfileStoreChain credentialProfileChain = new CredentialProfileStoreChain();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, given there are other services that need the update, we can do it all in a separate pr👍
generator/.DevConfigs/83d75756-74fc-4a10-98a6-96c5c71bda8b.json
Outdated
Show resolved
Hide resolved
|
||
private bool forcePathStyle = false; | ||
private bool useAccelerateEndpoint = false; | ||
private S3UsEast1RegionalEndpointValue? s3UsEast1RegionalEndpointValue; | ||
private readonly string legacyUSEast1GlobalRegionSystemName = RegionEndpoint.USEast1.SystemName; | ||
|
||
private static CredentialProfileStoreChain credentialProfileChain = new CredentialProfileStoreChain(); | ||
private static CredentialProfileStoreChain credentialProfileChain = new CredentialProfileStoreChain(Environment.GetEnvironmentVariable(AwsConfigFileEnvName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer changing this in a separate PR, since there are other configs that need to fixed:
aws-sdk-net/sdk/src/Services/SecurityToken/Custom/AmazonSecurityTokenServiceConfig.Extension.cs
Line 80 in 694f26c
private static readonly CredentialProfileStoreChain _credentialProfileChain = new CredentialProfileStoreChain(); private static CredentialProfileStoreChain credentialProfileChain = new CredentialProfileStoreChain();
73efa50
to
d75ea8d
Compare
…n config file
Description
This updates AmazonS3Config use-arn-region to take the value set in environment variable over that set in the ~/.aws/config file. This follows other env var + config file precedence.
Motivation and Context
dotnet-7073
Testing
dry run in v4 passes
Added unit tests
Screenshots (if appropriate)
Types of changes
Checklist
License