diff --git a/changelogs/unreleased/6565-kaovilai b/changelogs/unreleased/6565-kaovilai new file mode 100644 index 000000000..42e57b9da --- /dev/null +++ b/changelogs/unreleased/6565-kaovilai @@ -0,0 +1 @@ +Non default s3 credential profiles work on Unified Repository Provider (kopia) \ No newline at end of file diff --git a/pkg/repository/config/aws.go b/pkg/repository/config/aws.go index a3c63b949..c0e5ce994 100644 --- a/pkg/repository/config/aws.go +++ b/pkg/repository/config/aws.go @@ -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