Problem description
The X-Amz-Signature parameter is missing from the request.
Causes
The request uses Amazon S3-compatible Signature Version 4, but the X-Amz-Signature parameter was not included in the URL query string.
Examples
The following request is missing X-Amz-Signature:
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
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
Add X-Amz-Signature to the request and make sure all other parameters 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: trueTo avoid constructing requests manually, use Amazon S3 SDKs to initiate the request. For more information, see Use Amazon S3 SDKs to access OSS.
该文章对您有帮助吗?