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
region
set in profile in $HOME/.aws/config
is ignored
#3305
Comments
region
set in profile in $HOME/.aws/config
region
set in profile in $HOME/.aws/config
is ignored
Hi @olfek, Thank you for submitting the issue. Using latest .NET SDK and Package version, I unable to reproduce the scenario you mentioned. Can you please review below steps and let me know if I am missing anything? Or kindly assist in providing steps to reproduce the issue.
using Amazon.Runtime.CredentialManagement;
using Amazon.S3;
var credentialsFile = new SharedCredentialsFile(@"C:\Users\**\.aws\config");
CredentialProfile profile;
if (credentialsFile.TryGetProfile("test", out profile))
{
Console.WriteLine("Profile Region: " + profile.Region.SystemName);
var s3Client = new AmazonS3Client(profile.Region);
Console.WriteLine("Region Endpoint: " + s3Client.Config.RegionEndpoint);
}
Regards, |
@bhoradc ... I believe your understanding is different to what this issue is about.
Keep in mind using the
this.(s)erviceURL = profile.EndpointUrl and similarly this.(r)egionEndpoint = profile.Region .
|
@olfek How are you configuring the SDK to use a specific profile? There a few cases with the .NET SDK doesn't know what profile is being used because it is working with the low level primitives like credentials. In those cases it falls back to looking for configuration with the |
@normj --- I've set the
I'm using https://github.com/localstack/localstack by the way. |
@olfek The SDK either has the |
@normj ---
I'm expecting the ability to use a specific region with LocalStack, configured outside of code, to facilitate multi-region services. |
Describe the bug
region
set in profile in$HOME/.aws/config
IS NOT loaded in.Expected Behavior
region
set in profile in$HOME/.aws/config
IS loaded in.Current Behavior
region
set in profile, in$HOME/.aws/config
loaded into
Amazon.Runtime.CredentialManagement.CredentialProfile.Region
IS NOT CONSIDERED in
Amazon.Runtime.ClientConfig.get_RegionEndpoint
.Reproduction Steps
N/A
Possible Solution
region
set in profile, in$HOME/.aws/config
loaded into
Amazon.Runtime.CredentialManagement.CredentialProfile.Region
SHOULD BE CONSIDERED in
Amazon.Runtime.ClientConfig.get_RegionEndpoint
.Just like how:
endpoint_url
set in profile, in$HOME/.aws/config
loaded into
Amazon.Runtime.CredentialManagement.CredentialProfile.EndpointUrl
IS CONSIDERED in
Amazon.Runtime.ClientConfig.get_ServiceURL
.Additional Information/Context
N/A
AWS .NET SDK and/or Package version used
3.7.30X.XX
Targeted .NET Platform
.NET 7
Operating System and version
Windows 11
The text was updated successfully, but these errors were encountered: