Problem description
The value of the x-amz-credential header in the PostObject request is invalid.
Causes
The PostObject request uses an Amazon S3-compatible V4 signature, but the x-amz-credential header value does not contain the required five fields.
Examples
The following request uses an x-amz-credential header with only four fields. The oss service name is missing.
x-amz-credential: EXAMPLEAKID/20170710/cn-hangzhou/aws4_requestThe x-amz-credential header must contain five fields separated by forward slashes (/):
x-amz-credential: EXAMPLEAKID/20170710/cn-hangzhou/oss/aws4_requestSolutions
Set x-amz-credential to the following format:
<Access-Key-ID>/YYYYMMDD/<region>/<service>/aws4_request| Field | Description | Example |
|---|---|---|
<Access-Key-ID> | Your Alibaba Cloud AccessKey ID | EXAMPLEAKID |
YYYYMMDD | The date the request is signed, in YYYYMMDD format | 20170710 |
<region> | The OSS region ID where the bucket is located | cn-hangzhou |
<service> | The service name. For OSS, always use oss | oss |
aws4_request | A literal string required by AWS Signature Version 4 | aws4_request |
For more information about the PostObject operation, see PostObject.
该文章对您有帮助吗?