Problem description
The AccessKeyId field is missing from the request.
Causes
The request uses an Amazon S3-compatible signature but does not include the AWSAccessKeyId query parameter.
S3-compatible presigned URLs require all three of the following query parameters:
| Parameter | Description |
|---|---|
AWSAccessKeyId | Identifies the access key used to sign the request |
Expires | Unix timestamp after which the URL is no longer valid |
Signature | HMAC signature calculated from the request and your secret key |
If any of these parameters is missing, OSS cannot validate the request and returns this error.
Examples
The following request uses an S3-compatible signature but omits AWSAccessKeyId:
GET /test.txt?Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv**** 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 the missing AWSAccessKeyId parameter to your request. A complete request looks like this:
GET /test.txt?AWSAccessKeyId=nz2p****&Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv**** 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 presigned URLs manually, use Amazon S3 SDKs to generate requests. For details, see Use Amazon S3 SDKs to access OSS.
该文章对您有帮助吗?