Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in AWS by (12.4k points)
recategorized by

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?

1 Answer

0 votes
by (5.6k points)

It seems like you are 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>

Do Check out here for more information. https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html#options

Also, Do Check out the AWS Certification Course offered by Intellipaat. 

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

1.2k questions

2.7k answers

501 comments

693 users

Browse Categories

...