s3: prevent repeated credential queries with anonymous authentication
This commit is contained in:
parent
be98402ac6
commit
a2a2401a68
1 changed files with 3 additions and 0 deletions
|
@ -132,6 +132,9 @@ func getCredentials(cfg Config) (*credentials.Credentials, error) {
|
|||
|
||||
if c.SignerType == credentials.SignatureAnonymous {
|
||||
debug.Log("using anonymous access for %#v", cfg.Endpoint)
|
||||
// short circuit credentials resolution when using anonymous access
|
||||
// otherwise the IAM provider would continuously try to (unsuccessfully) retrieve new credentials
|
||||
creds = credentials.New(&credentials.Static{})
|
||||
}
|
||||
|
||||
roleArn := os.Getenv("RESTIC_AWS_ASSUME_ROLE_ARN")
|
||||
|
|
Loading…
Reference in a new issue