Problem description
The timestamp in your signed request is too far from the server's current time. OSS rejected the request because the time difference exceeded the allowed threshold.
Causes
OSS validates the timestamp in every Amazon S3-compatible signed request. If the time difference between the timestamp in the signed request and the time when the server receives the request is too large, OSS returns this error.
The timestamp is read from one of these locations:
The
Daterequest headerThe
x-amz-datefield
Examples
The following request was signed with a Date of December 2020 but received by the server in 2022. The two-year gap exceeds the allowed threshold, so OSS returns this error.
GET /test.txt?AWSAccessKeyId=LTAI****************&Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv**** HTTP/1.0
Date: Tue, 20 Dec 2020 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
x-oss-s3-compat: trueSolutions
Set a valid, current timestamp in the Date request header or the x-amz-date field before signing the request.
The simplest way to avoid this error is to use an SDK, which generates and signs requests automatically:
To use Alibaba Cloud SDKs, see Overview.
To use Amazon S3 SDKs with OSS, see Use Amazon S3 SDKs to access OSS.
References
Overview — Alibaba Cloud SDKs generate signatures automatically.