Skip to content

Commit

Permalink
backup/pitr_coll: use target client of S3 (#59044) (#59050)
Browse files Browse the repository at this point in the history
close #59043
  • Loading branch information
YuJuncen authored Jan 21, 2025
1 parent f069f0b commit 04a27be
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions br/pkg/storage/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,8 @@ func (rs *S3Storage) CopyFrom(ctx context.Context, e ExternalStorage, spec CopyS
Key: aws.String(rs.options.Prefix + spec.To),
}

// NOTE: Maybe check whether the Go SDK will handle 200 OK errors.
// https://repost.aws/knowledge-center/s3-resolve-200-internalerror
_, err := s.svc.CopyObjectWithContext(ctx, copyInput)
// We must use the client of the target region.
_, err := rs.svc.CopyObjectWithContext(ctx, copyInput)
return err
}

Expand Down

0 comments on commit 04a27be

Please sign in to comment.