From c2030c3ba76546d585339127a01abc92a1f2964c Mon Sep 17 00:00:00 2001 From: Heiko Besemann Date: Wed, 9 Aug 2023 16:03:28 +0200 Subject: [PATCH] minio: add missing region on client initialization The missing region will cause issues if you're using AWS located in non-US datacentres that will return http 301 for the BucketExists() call --- modules/storage/minio.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/storage/minio.go b/modules/storage/minio.go index e2ce09d07a516..e7c315ae44d0a 100644 --- a/modules/storage/minio.go +++ b/modules/storage/minio.go @@ -84,6 +84,7 @@ func NewMinioStorage(ctx context.Context, cfg *setting.Storage) (ObjectStorage, Creds: credentials.NewStaticV4(config.AccessKeyID, config.SecretAccessKey, ""), Secure: config.UseSSL, Transport: &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: config.InsecureSkipVerify}}, + Region: config.Location, }) if err != nil { return nil, convertMinioErr(err)