Problem description
HTTP status code 400 that indicates an invalid key is returned when a read, upload, or download request is sent to an Object Storage Service (OSS) bucket that performs server-side encryption based on the keys that are managed by Key Management Service (KMS).
Causes
The KMS-managed key that is specified in the request is invalid.
Examples
When you upload an object to a bucket that uses server-side encryption, and specify a KMS-managed key for encryption and decryption, HTTP status 400 is returned if the specified KMS-managed key contains invalid characters.
Solutions
Refer to the KMS documentation to check the error details and resolve the issue. For more information, see Sample responses.
You can also contact KMS technical support.