Nisu
Nisu

Reputation: 340

Boto3 put_object() fails when I am using SSECustomerKey

I have been trying for the past day to load some encrypted text to a Ceph object storage, but whenever I try, I get the following error:

botocore.exceptions.ClientError: An error occurred (InvalidRequest) when calling the PutObject operation: Unknown

The code I am using is this:

random_key = os.urandom(32)

s3.put_object(Bucket=BUCKET_NAME,
              Key=KEY,
              Body='the quick brown fox jumps over the lazy dog',
              SSECustomerKey=random_key,
              SSECustomerAlgorithm='AES256'
              )

I am mentioning that if I remove SSECustomerKey=random_key,SSECustomerAlgorithm='AES256' then it loads the text.

Upvotes: 2

Views: 260

Answers (0)

Related Questions