Problem description
The X-Amz-Algorithm field in the request is missing.
Causes
You initiated a request that uses an Amazon S3-compatible V4 signature. However, the X-Amz-Algorithm field, which specifies the signing algorithm, is absent from the request.
Examples
The following request is missing X-Amz-Algorithm:
GET /test.txt?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: trueSolutions
Make sure that the URL query string contains the following required fields: X-Amz-Algorithm, X-Amz-Credential, X-Amz-Signature, X-Amz-Date, X-Amz-SignedHeaders, and X-Amz-Expires. The following example shows a correctly formed request:
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: trueTo avoid manually constructing presigned URLs, use an Amazon S3 SDK to generate them. SDKs handle all SigV4 signing parameters automatically. For setup and code examples, see Use Amazon S3 SDKs to access OSS.
该文章对您有帮助吗?