From a034f02fb2e08a5f1d4c3d6cf92d3b9028817734 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 4 Aug 2020 13:07:30 +0300 Subject: [PATCH] lib/backup: allow using `~/.aws/config` without region Use us-west-2 for determining bucket region. --- lib/backup/s3remote/s3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/backup/s3remote/s3.go b/lib/backup/s3remote/s3.go index 0f6ece5f9..b6e31a6e7 100644 --- a/lib/backup/s3remote/s3.go +++ b/lib/backup/s3remote/s3.go @@ -80,7 +80,7 @@ func (fs *FS) Init() error { } else { // Determine bucket region. ctx := context.Background() - region, err := s3manager.GetBucketRegion(ctx, sess, fs.Bucket, "") + region, err := s3manager.GetBucketRegion(ctx, sess, fs.Bucket, "us-west-2") if err != nil { return fmt.Errorf("cannot determine region for bucket %q: %w", fs.Bucket, err) }