jeanbmar / s3-sync-client

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

`commandInput` options not passed to `CompleteMultipartLocalObjectCommand` #59

Open jstastny opened 1 year ago

jstastny commented 1 year ago

We use server side encryption with customer keys and therefore set the SSECustomerAlgorithm and SSECustomerKey in the commandInput argument. This works great with everything except multipart uploads.

This is caused by the CompleteMultipartLocalObjectCommand not using the commandInput in CompleteMultipartLocalObjectCommand. The CreateMultipartLocalObjectUploadCommand that calls the complete command upon completion uses the additional headers properly, but does not pass them on to the Complete command.

jstastny commented 1 year ago

I was probably wrong about the root cause. The error message I am getting is: InvalidRequest: The multipart upload initiate requested encryption. Subsequent part requests must include the appropriate encryption parameters. and the stack trace mentions /src/commands/UploadLocalObjectPartCommand.ts:76:24 as the last location in the s3-sync-client library.