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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With