From 9058ec32e18c5ef90f3d8bd78cb3505f77ae348c Mon Sep 17 00:00:00 2001 From: David Date: Fri, 26 Jun 2020 14:09:29 +0100 Subject: [PATCH] s3: Use regional s3 us-east-1 endpoint --- backend/s3/s3.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/s3/s3.go b/backend/s3/s3.go index d60f1de19..d8ec3fbc3 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -40,6 +40,7 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials/stscreds" "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/ec2metadata" + "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" @@ -1204,7 +1205,9 @@ func s3Connection(opt *Options) (*s3.S3, *session.Session, error) { WithCredentials(cred). WithHTTPClient(fshttp.NewClient(fs.Config)). WithS3ForcePathStyle(opt.ForcePathStyle). - WithS3UseAccelerate(opt.UseAccelerateEndpoint) + WithS3UseAccelerate(opt.UseAccelerateEndpoint). + WithS3UsEast1RegionalEndpoint(endpoints.RegionalS3UsEast1Endpoint) + if opt.Region != "" { awsConfig.WithRegion(opt.Region) }