lib/backup: allow using ~/.aws/config without region

Use us-west-2 for determining bucket region.
This commit is contained in:
Aliaksandr Valialkin 2020-08-04 13:07:30 +03:00
parent e6eee2bebf
commit a034f02fb2

View File

@ -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)
}