Problem description
The SSEAlgorithm
parameter is not set to KMS in the request, but the KMSMasterKeyID
header is specified.
Causes
The SSEAlgorithm
parameter is not set to KMS in the PutBucketEncryption request, but the KMSMasterKeyID
header is specified.
Examples
PUT /?encryption HTTP/1.1
Date: Thur, 5 Nov 2020 11:09:13 GMT
Content-Length: ContentLength
Content-Type: application/xml
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS qn6q**************:77Dv****************
<?xml version="1.0" encoding="UTF-8"?>
<ServerSideEncryptionRule>
<ApplyServerSideEncryptionByDefault>
<SSEAlgorithm>AES256</SSEAlgorithm>
<KMSMasterKeyID>9468da86-3509-4f8d-a61e-6eab1eac****</KMSMasterKeyID>
</ApplyServerSideEncryptionByDefault>
</ServerSideEncryptionRule>
The error is returned for the preceding request because the SSEAlgorithm
parameter in the ApplyServerSideEncryptionByDefault
node is set to AES256
and the KMSMasterKeyID
parameter is also specified.
Solutions
If KMS encryption is not specified in the request, delete the KMSMasterKeyID
header from the request.