"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
s3: fix STS call per request by caching AssumeRole credentials
Nick Craig-Wood9d4c912e0e47
diff --git a/backend/s3/s3.go b/backend/s3/s3.goindex eb4e4de57..0d1923673 100644--- a/backend/s3/s3.go+++ b/backend/s3/s3.go@@ -1522,8 +1522,10 @@ func s3Connection(ctx context.Context, opt *Options, client *http.Client) (s3Cli}}- // Create AssumeRole credentials provider- awsConfig.Credentials = stscreds.NewAssumeRoleProvider(stsClient, opt.RoleARN, assumeRoleOptions)+ // Create AssumeRole credentials provider, wrapped in a+ // CredentialsCache so we don't call AssumeRole on every+ // request.+ awsConfig.Credentials = aws.NewCredentialsCache(stscreds.NewAssumeRoleProvider(stsClient, opt.RoleARN, assumeRoleOptions))}provider = loadProvider(opt.Provider)