AWS_DEFAULT_REGION environment variable not being read. #2589
Labels
bug
This issue is a bug.
module/sdk-core
needs-review
p2
This is a standard priority issue
queued
xs
Effort estimation: tiny
Describe the bug
When calling the EnvironmentVariableAWSRegion, the code is only looking at AWS_REGION it should also look at AWS_DEFAULT_REGION as well.
Expected Behavior
The code should look at both environment variables AWS_DEFAULT_REGION and AWS_REGION
Current Behavior
The code only looks at AWS_REGION environment variable
Reproduction Steps
Remove AWS_REGION environment variable and add AWS_DEFAULT_REGION environment variable. Then try to instantiate an AmazonServiceClient.
Possible Solution
If the AWS_REGION environment variable is not set check the AWS_DEFAULT_REGION environment variable before throwing exception.
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.Core -Version 3.7.106.24
Targeted .NET Platform
.NET 6, .NET 7
Operating System and version
ALL
The text was updated successfully, but these errors were encountered: