Merge pull request #6565 from kaovilai/s3profilefix-1.10

GetS3Credentials pass profile from config to NewSharedCredentials
This commit is contained in:
Xun Jiang/Bruce Jiang
2023-08-07 14:40:01 +08:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -0,0 +1 @@
Non default s3 credential profiles work on Unified Repository Provider (kopia)

View File

@@ -64,7 +64,7 @@ func GetS3Credentials(config map[string]string) (credentials.Value, error) {
return credentials.Value{}, errors.New("missing credential file")
}
creds := credentials.NewSharedCredentials(credentialsFile, "")
creds := credentials.NewSharedCredentials(credentialsFile, config[awsProfileKey])
credValue, err := creds.Get()
if err != nil {
return credValue, err