jeanbmar / s3-sync-client

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

Support AWS CLI option --acl #32

Closed dsietziapp closed 2 years ago

dsietziapp commented 2 years ago

When syncing objects to the S3 bucket, it is often necessary to also set the ACL at the same time.

--acl bucket-owner-full-control --recursive

This can be done using the SDK PutObjectAclCommand, however, it would be so much easier if it were one of the supported options.

jeanbmar commented 2 years ago

Hey there, it is already implemented through the commandInput option (https://github.com/jeanbmar/s3-sync-client#use-aws-sdk-command-input-options):

// set ACL, fixed value
await sync('s3://mybucket', '/path/to/local/dir', {
    commandInput: {
        ACL: 'aws-exec-read',
    },
});
dsietziapp commented 2 years ago

That's fantastic. Thanks for the fast reply!