Skip to content

Commit 28c39ff

Browse files
committed
[PBM-1239] use ListObjectsV2 api
1 parent 51620cf commit 28c39ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pbm/storage/s3/s3.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ func (s *S3) List(prefix, suffix string) ([]storage.FileInfo, error) {
400400
prfx += "/"
401401
}
402402

403-
lparams := &s3.ListObjectsInput{
403+
lparams := &s3.ListObjectsV2Input{
404404
Bucket: aws.String(s.opts.Bucket),
405405
}
406406

@@ -409,8 +409,8 @@ func (s *S3) List(prefix, suffix string) ([]storage.FileInfo, error) {
409409
}
410410

411411
var files []storage.FileInfo
412-
err := s.s3s.ListObjectsPages(lparams,
413-
func(page *s3.ListObjectsOutput, lastPage bool) bool {
412+
err := s.s3s.ListObjectsV2Pages(lparams,
413+
func(page *s3.ListObjectsV2Output, lastPage bool) bool {
414414
for _, o := range page.Contents {
415415
f := aws.StringValue(o.Key)
416416
f = strings.TrimPrefix(f, aws.StringValue(lparams.Prefix))

0 commit comments

Comments
 (0)