Server Side Encryption with Object Storage (S3)?


I was wondering if anyone else is having any issues with trying to upload files to object storage with server side encryption?
I tried following this guide:

I keep getting the following error:

botocore.exceptions.ClientError: An error occurred (InvalidArgument) when calling the PutObject operation: Requests specifying Server Side Encryption with Customer provided keys must provide an appropriate secret key.

Uploading unencrypted files is working

1 Reply

Nevermind, it's working. I didn't need to base64 the encryption key. Seems like there's something wrong with terraform


Fixed by removing the trailing new line

openssl rand -hex 16 | tr -d "\n" | base64 


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct