-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Description
The AWS SDK for Go has the following lines:
func (cfg *sharedConfig) validateCredentialType() error {
// Only one or no credential type can be defined.
if !oneOrNone(
len(cfg.SourceProfileName) != 0,
len(cfg.CredentialSource) != 0,
len(cfg.CredentialProcess) != 0,
len(cfg.WebIdentityTokenFile) != 0,
cfg.hasSSOConfiguration(),
) {
return ErrSharedConfigSourceCollision
}
return nil
}Which doesn't play nicely with the generated profiles in ~/.aws/config:
[profile example]
sso_start_url = https://example.awsapps.com/start
sso_region = us-east-1
sso_account_id = 0123456789012
sso_role_name = example-role
region = us-east-1
credential_process = aws-sso-credential-process --profile exampleRepro code:
package main
import (
"github.com/aws/aws-sdk-go/aws/session"
)
func main() {
_, err := session.NewSessionWithOptions(session.Options{
Profile: "example",
SharedConfigState: session.SharedConfigEnable,
})
if err != nil {
panic(err)
}
}I've only just started using this tool so I don't yet have a solution on how to best fix this.
Metadata
Metadata
Assignees
Labels
No labels