jeanbmar / s3-sync-client

AWS CLI s3 sync command for Node.js
MIT License
83 stars 22 forks source link

Feature Request: allow sync without listBucketObjects #41

Closed xiaoxiangmoe closed 2 years ago

xiaoxiangmoe commented 2 years ago

https://github.com/jeanbmar/s3-sync-client/blob/67c9758611ae8d187649ac3abcde6afe15754e52/lib/commands/bucket-with-local.js#L24

Some s3 credentials are not allowed to list objects. Can you provide an option to disable listBucketObjects?

jeanbmar commented 2 years ago

It's not possible for the reasons explained here: https://aws.amazon.com/premiumsupport/knowledge-center/s3-access-denied-listobjects-sync/

More specifically, the following happens:

1.    Amazon S3 lists the source and destination to check whether the object exists.

2.    Amazon S3 then performs the following API calls:

CopyObject call for a bucket to bucket operation
GetObject for a bucket to local operation
PutObject for a local to bucket operation