title: how to upload files to s3 from aws cli with kms encryption
body: <p>I want to upload a file from local machine to s3 with kms encryption . I have been using the following command:</p>
  
  <pre><code>    aws s3 cp /filepath s3://mybucket/filename --sse-kms-key-id &lt;key id&gt;
  </code></pre>
  
  <p>it shows the following error " <strong>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"</strong>
  What could possibly be causing this error?</p>