You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the default authentication flow is used with config.LoadDefaultConfig(), providing an invalid profile name, either with config.WithSharedConfigProfile() or by setting AWS_PROFILE, does not cause an error, but falls back to trying IMDS.
Expected behavior
In the AWS CLI, I get
$ AWS_PROFILE=no-such-profile aws sts get-caller-identityThe config profile (no-such-profile) could not be found
The SDK should fail with a config.SharedConfigProfileNotExistError error.
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Documentation
Describe the bug
When the default authentication flow is used with
config.LoadDefaultConfig()
, providing an invalid profile name, either withconfig.WithSharedConfigProfile()
or by settingAWS_PROFILE
, does not cause an error, but falls back to trying IMDS.Expected behavior
In the AWS CLI, I get
The SDK should fail with a
config.SharedConfigProfileNotExistError
error.Current behavior
The AWS SDK falls back to calling IMDS
Steps to Reproduce
and set
AWS_PROFILE
to an invalid profile nameor
Possible Solution
No response
AWS Go SDK version used
github.com/aws/aws-sdk-go-v2 v1.13.0, github.com/aws/aws-sdk-go-v2/config v1.13.1
Compiler and Version used
go version go1.17.2 darwin/amd64
Operating System and version
N/A
The text was updated successfully, but these errors were encountered: