All Products
Search
Document Center

Object Storage Service:0006-00000116

Last Updated:Mar 20, 2026

Problem description

A PostObject request using the S3-compatible API fails when the request body includes the x-amz-server-side-encryption-aws-kms-key-id form field. Object Storage Service (OSS) does not support this field in PostObject requests.

Causes

When you initiate an Amazon S3-compatible PostObject request to upload an object and include the x-amz-server-side-encryption-aws-kms-key-id form field in the request body, a request error is reported because this form field is not supported in the request body.

Examples

The following request body triggers the error. The x-amz-server-side-encryption-aws-kms-key-id form field is present in the request:

POST / HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Length: 6443500495
Date: Sat, 18 Feb 2023 05:17:02 GMT
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryW0DET1iaBMeAOBg3
Host: example-bucket.oss-cn-hangzhou.aliyuncs.com
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="key"
big.img
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="x-amz-server-side-encryption-aws-kms-key-id"
abc
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="policy"
eyJleHBpcmF0aW9uIjoiMjAyMy0wMi0xOFQxMzoxOTowMC4wMDBaIiwiY29uZGl0aW9ucyI6W1siY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMTA0ODU3NjAwMF1dfQ==
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="AWSAccessKeyId"
LTAI****************
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="success_action_status"
200
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="signature"
miAoLVohS5*****WEXyC3wVecaQ=
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="file"; filename="big.img"
Content-Type: application/octet-stream
***
------WebKitFormBoundaryW0DET1iaBMeAOBg3--

Solutions

Remove the x-amz-server-side-encryption-aws-kms-key-id form field from the request body before submitting the PostObject request.

References