0002-00000415
Problem description
The X-Amz-Date request parameter is in an incorrect format.
Causes
You sent a request that uses an Amazon S3-compatible V4 signature, but the X-Amz-Date parameter is in an incorrect format.
Example problems
You sent a request that includes a signature in the URL parameters, but the X-Amz-Date parameter is in an incorrect format.
GET /test.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LTAI****************/20221220/us-east-1/s3/aws4_request&X-Amz-Date=2022-12-20-08:48:18&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
X-Amz-Date specifies the time when the request is sent. The format must be yyyyMMddTHHmmssZ. In the preceding example, the value of X-Amz-Date is 2022-12-20-08:48:18, which is an incorrect format.
Solutions
Replace the value of the X-Amz-Date parameter from 2022-12-20-08:48:18 to 20221220T084818Z. Make sure that all parameters in the URL request are complete and correct. The following code provides a valid example:
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.