Problem description
The value of the X-Amz-Algorithm parameter in the request is invalid.
Causes
You initiated a request that uses an Amazon S3-compatible V4 signature, but the value of the X-Amz-Algorithm parameter is invalid.
Examples
You initiated a request to include the signature in the URL, but the value of the X-Amz-Algorithm parameter is invalid.
GET /test.txt?X-Amz-Algorithm=AWS4-HMAC-SHA1&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=ab2***st HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
x-oss-s3-compat: trueThe X-Amz-Algorithm parameter is used to specify the signature algorithm. Only AWS4-HMAC-SHA256 is supported. In the example, the value of this field is AWS4-HMAC-SHA1. The value of this field is invalid.
Solutions
Set the X-Amz-Algorithm parameter to AWS4-HMAC-SHA256 and make sure that the other request parameters are valid. The following code provides an example on how to correctly specify the X-Amz-Algorithm parameter:
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: trueWe recommend that you use Amazon S3 SDKs to initiate the request. For more information, see Use Amazon S3 SDKs to access OSS.