问题描述
我想使用kms加密将文件从本地计算机上传到s3.我一直在使用以下命令:
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>
它显示以下错误"发生错误:调用PutObject操作时:使用AWS KMS托管密钥的服务器端加密需要HTTP标头x-amz -server-side-encryption:aws:kms" 可能是什么原因导致此错误?
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?
推荐答案
您似乎缺少了--sse aws:kms
标志.您可能正在寻找类似的东西
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>
查看使用s3 cp选项有关更多详细信息.
Check out aws s3 cp options for more details.
这篇关于如何使用kms加密将文件从AWS cli上传到s3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!