Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. how to upload an object to S3 bucket via AWS cli with x-aws-server-side-encryption set on the object? An example would be much appreciated.

like image 401
Aty Avatar asked Feb 08 '17 19:02

Aty


People also ask

Can S3 bucket be encrypted?

You can set the default encryption behavior on an Amazon S3 bucket so that all objects are encrypted when they are stored in the bucket. The objects are encrypted using server-side encryption with either Amazon S3-managed keys (SSE-S3) or AWS Key Management Service (AWS KMS) keys.

What encryption does AWS S3 use?

We encrypt your data using 256-bit AES encryption, also known as AES-256, one of the strongest block ciphers available. You can apply encryption to data stored using Amazon S3's Standard or Reduced Redundancy Storage options.


1 Answers

You don't mention what tool or SDK you are using to interact with S3. To use the AWS CLI tool to copy a file to S3 with the server-side-encryption flag set:

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.

like image 127
Mark B Avatar answered Nov 15 '22 04:11

Mark B