From 9d993e584b0153dc102efa691500fd458fa83274 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 5 Jan 2020 17:53:45 +0000 Subject: [PATCH] s3: force path style bucket access to off for AWS deprecation AWS are deprecating path style bucket access so rclone should stop using it by default for this provider. This change shouldn't break any workflows as all AWS endpoints support virtual hosted style lookups of buckets. It may even improve performance. See: https://aws.amazon.com/blogs/aws/amazon-s3-path-deprecation-plan-the-rest-of-the-story/ --- backend/s3/s3.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/s3/s3.go b/backend/s3/s3.go index 68b78641d..5ea0a5a24 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -765,7 +765,9 @@ if false then rclone will use virtual path style. See [the AWS S3 docs](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro) for more info. -Some providers (eg Aliyun OSS or Netease COS) require this set to false.`, +Some providers (eg AWS, Aliyun OSS or Netease COS) require this set to +false - rclone will do this automatically based on the provider +setting.`, Default: true, Advanced: true, }, { @@ -1028,7 +1030,7 @@ func s3Connection(opt *Options) (*s3.S3, *session.Session, error) { if opt.Region == "" { opt.Region = "us-east-1" } - if opt.Provider == "Alibaba" || opt.Provider == "Netease" || opt.UseAccelerateEndpoint { + if opt.Provider == "AWS" || opt.Provider == "Alibaba" || opt.Provider == "Netease" || opt.UseAccelerateEndpoint { opt.ForcePathStyle = false } awsConfig := aws.NewConfig().