0002-00000421
Problem description
The time in the X-Amz-Credential request parameter does not match the time in the X-Amz-Date request parameter.
Causes
You sent a request that uses an Amazon S3-compatible V4 signature. However, the time in the X-Amz-Credential request parameter does not match the time in the X-Amz-Date request parameter.
Examples
You sent a request that includes a signature in the header. However, the time in the X-Amz-Credential request parameter does not match the time in the X-Amz-Date request parameter.
GET /test.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LTAI****************/20201220/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: true
The time in the X-Amz-Credential request parameter is 20201220, and the time in the X-Amz-Date request parameter is 20221220T084818Z. The two values do not match.
Solutions
Ensure that the time in the X-Amz-Credential request parameter matches the time in the X-Amz-Date request parameter and that all parameters in the URL request are complete and correct. The following example shows a correct 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: true
We recommend that you use Amazon S3 SDKs to initiate the request. For more information, see Use Amazon S3 SDKs to access OSS.