Describe the bug
validateCredentialType() does not allow more than one credential provider configuration in a profile. This does not align with the AWS CLI and other SDKs, which have a hierarchy of credential providers and do not continue to check against providers later in the chain if one is satisfied.
This is an issue because not all AWS SDKs support AWS SSO configuration, so being able to provide a credential process backup (using a tool like aws-sso-util) allows one profile to work both with SDKs that support AWS SSO and those that don't, transparently (because the SSO provider is higher up in the chain).
Version of AWS SDK for Go?
v1.37
To Reproduce (observed behavior)
Create a profile in ~/.aws/config that looks like
[profile my-profile]
region = us-east-2
sso_start_url = https://foo.awsapps.com/start
sso_region = us-east-2
sso_account_id = 123456789012
sso_role_name = MyRole
credential_process = aws-sso-util credential-process --profile my-profile
Expected behavior
When using the Go SDK with my-profile, the AWS SSO configuration should be used and no error should occur.
Supposing aws-sso-util is installed:
When using the appropriate version of the AWS CLI v2, boto3, or Go SDK, the AWS SSO configuration should be used and no error should occur.
When using the JavaScript SDK for Node, or an older version of AWS CLI v1, boto3 or the Go SDK, the AWS SSO configuration will not be recognized, and the credential process will be used, which supports getting AWS SSO credentials using the profile's configuration.