简体   繁体   English

aws s3桶加密

[英]aws s3 bucket encryption

i have created an S3 bucket and assigned SSE bucket policy(server side encryption with Amazon S3-managed keys ) to it via cloud formation. 我创建了一个S3存储桶,并通过云形成为其分配了SSE存储桶策略(使用Amazon S3管理的密钥进行服务器端加密)。 how to upload an object to S3 bucket via AWS cli with x-aws-server-side-encryption set on the object? 如何通过AWS cli将对象上传到S3存储桶,并在对象上设置x-aws-server-side-encryption? An example would be much appreciated. 一个例子将非常感激。

You don't mention what tool or SDK you are using to interact with S3. 您没有提到用于与S3交互的工具或SDK。 To use the AWS CLI tool to copy a file to S3 with the server-side-encryption flag set: 要使用AWS CLI工具将文件复制到S3,并设置server-side-encryption标志:

aws s3 cp <local path> <s3 path> --sse AES256

There are other -sse options you can use to specify other encryption keys such as KMS keys. 您还可以使用其他选项来指定其他加密密钥,例如KMS密钥。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM