I want to upload a file from local machine to s3 with kms encryption . I have been using the following command:
aws s3 cp /filepath s3://mybucket/filename --sse-kms-key-id <key id>
it shows the following error " error occured:when calling the PutObject operation: Server Side Encryption with AWS KMS managed key requires HTTP header x-amz -server-side-encryption : aws:kms" What could possibly be causing this error?
It looks like you're missing the --sse aws:kms
flag. You're likely looking for something like
aws s3 cp /filepath s3://mybucket/filename --sse aws:kms --sse-kms-key-id <key id>
Check out aws s3 cp options for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With