Skip to content

sts GetCallerIdentity returns result instead of error in in disabled region #2846

Closed
@AmitOttenheimer

Description

@AmitOttenheimer

Acknowledgements

Describe the bug

Hey,
I am using "github.com/aws/aws-sdk-go-v2/service/sts" in order to check if s specific region sts status is disabled or not.
In the docs its mentioned that if a region is disabled the service client fallback behavior should be failure but I am still getting a result instead of an error

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Return Error

Current Behavior

Return the Account Data

Reproduction Steps

tempConfig equals *aws.Config with our account information 
tempConfig.Region = region
tempConfig.DefaultsMode = awsV2.DefaultsModeInRegion
stsClient := ClientCreator.CreateSTSClient(ctx, &tempConfig)
res, err := stsClient.GetCallerIdentity(ctx, &stsV2.GetCallerIdentityInput{})

Possible Solution

No response

Additional Information/Context

No response

AWS Go SDK V2 Module Versions Used

github.com/aws/aws-sdk-go-v2/service/[email protected]

Compiler and Version used

1.23.1

Operating System and version

darwin/arm64

Metadata

Metadata

Assignees

Labels

guidanceQuestion that needs advice or information.p3This is a minor priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions