From 7428dc74d2e4811b346d3108f83452e7c81b55eb Mon Sep 17 00:00:00 2001 From: Achyut Madhusudan Date: Tue, 9 Apr 2024 19:52:00 +0530 Subject: [PATCH] sessionInfo.Endpoint includes the scheme so it was mandatory to check for "https://" Signed-off-by: Achyut Madhusudan --- backend/src/v2/objectstore/object_store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/v2/objectstore/object_store.go b/backend/src/v2/objectstore/object_store.go index cf272ae2208..eb183284485 100644 --- a/backend/src/v2/objectstore/object_store.go +++ b/backend/src/v2/objectstore/object_store.go @@ -371,7 +371,7 @@ func createBucketSession(ctx context.Context, namespace string, sessionInfo *Ses // for (1) the endpoint is not required, thus we skip it, otherwise the writer will fail to close due to region mismatch. // https://aws.amazon.com/blogs/infrastructure-and-automation/best-practices-for-using-amazon-s3-endpoints-in-aws-cloudformation-templates/ // https://docs.aws.amazon.com/sdk-for-go/api/aws/session/ - if strings.ToLower(sessionInfo.Endpoint) != "s3.amazonaws.com" { + if strings.ToLower(sessionInfo.Endpoint) != "https://s3.amazonaws.com" { config.Endpoint = aws.String(sessionInfo.Endpoint) glog.Infof("%s is the current config endpoint", config.Endpoint) }