All Products
Search
Document Center

Object Storage Service:0002-00000423

Last Updated:Mar 27, 2025

Problem description

The value of the X-X-Amz-Signature field in the request is invalid.

Causes

You initiated a request that used the Amazon S3-compatible V4 signature. However, the value of the X-Amz-Signature field in the request was invalid.

Examples

The following code provides an example of a URL-based request that uses the S3-compatible V4 signature and whose X-Amz-Signature field has an invalid value.

GET /test.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LTAI****************/20221220/us-east-1/s3/aws4_request&X-Amz-Date=20221220T084818Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=abc HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
x-oss-s3-compat: true

The value of the X-Amz-Signature field must be 64 characters in length. In the preceding example, the value of this field is abc, which are three characters in total.

Solutions

Make sure that the value of the X-Amz-Signature field meets the requirement, the URL-based request is complete, and all fields of the request are correctly configured. The following code provides an example of a complete URL-based request whose fields are correctly configured.

GET /test.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LTAI****************/20221220/us-east-1/s3/aws4_request&X-Amz-Date=20221220T084818Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=ab2s**** HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
x-oss-s3-compat: true

We recommend that you use Amazon S3 SDKs to initiate the request. For more information, see Use Amazon S3 SDKs to access OSS.