SSO parameters are not loaded from credentials file #1749
Labels
bug
This issue is a bug.
pending-release
This issue will be fixed by an approved PR that hasn't been released yet.
Describe the bug
Loading config fails in v2 if SSO parameters are in credentials file
Expected Behavior
The library should use the sso parameters from credentials file. This works in sdk v1 and with aws cli.
Current Behavior
Loading the config gives this error:
failed to load assume role arn:aws:iam::accountA:role/roleB, of profile login, <nil>
Reproduction Steps
Configuration
These are the config files used
~/.aws/config
~/.aws/credentials
Code
The code above results in this error
failed to load assume role arn:aws:iam::accountA:role/roleB, of profile login, <nil>
This code doing the same thing with v1 of aws-sdk-go works fine
Possible Solution
No response
Additional Information/Context
If SSO parameters are moved from credentials file to config file aws-sdk-go v2 works fine, but documentation say they can be in credentials file as well. And it works in v1 and when using the aws cli.
AWS Go SDK V2 Module Versions Used
github.com/aws/aws-sdk-go-v2 v1.16.5
github.com/aws/aws-sdk-go-v2/config v1.15.11
Compiler and Version used
go version go1.18.1 darwin/arm64
Operating System and version
MacOS 12.4
The text was updated successfully, but these errors were encountered: