diff --git a/agent/utils/cloud_storage/client/s3.go b/agent/utils/cloud_storage/client/s3.go index b7b25cd81..79d2e168a 100644 --- a/agent/utils/cloud_storage/client/s3.go +++ b/agent/utils/cloud_storage/client/s3.go @@ -46,8 +46,7 @@ func NewS3Client(vars map[string]interface{}) (*s3Client, error) { client := s3.NewFromConfig(cfg, func(o *s3.Options) { o.UsePathStyle = mode == "path" if endpoint != "" { - base := normalizeEndpoint(endpoint) - o.BaseEndpoint = aws.String(base) + o.BaseEndpoint = aws.String(normalizeEndpoint(endpoint)) } }) diff --git a/core/utils/cloud_storage/client/s3.go b/core/utils/cloud_storage/client/s3.go index 93e233cbc..335484b11 100644 --- a/core/utils/cloud_storage/client/s3.go +++ b/core/utils/cloud_storage/client/s3.go @@ -44,7 +44,7 @@ func NewS3Client(vars map[string]interface{}) (*s3Client, error) { client := s3.NewFromConfig(cfg, func(o *s3.Options) { o.UsePathStyle = mode == "path" if endpoint != "" { - o.EndpointResolver = s3.EndpointResolverFromURL(normalizeEndpoint(endpoint)) + o.BaseEndpoint = aws.String(normalizeEndpoint(endpoint)) } }) return &s3Client{scType: scType, bucket: bucket, client: client}, nil