I want to upload files from the local machine to S3 with KMS encryption, I have been using the below commands:
aws s3 cp /filepath s3://mybucket/filename --sse-kms-key-id <key id>
It shows the following error
" error occurred: 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?