使用 AWS_CLI 执行 aws iam list-users 时出错

Error while doing aws iam list-users using AWS_CLI

我正在尝试在 AWS CLI 中 运行 aws iam list-users 但出现错误。错误是:

An error occurred (SignatureDoesNotMatch) when calling the ListUsers operation: Signature not yet current: 20210606T055848Z is still later than 20210605T174350Z (20210605T172850Z + 15 min.)

如果有人知道这个解决方案,请告诉我。

错误很明显,请求是为 20210606T055848Z 签名的,但“当前”是 20210605T172850Z。格式不同:05:58:48 @ 06.06.2021(已签名)与 17:28:05 @ 05.06.2021(当前)。两个时间戳相差12个半小时

这意味着您计算机的本地时间/创建请求的过程不正确,或者该请求是有意安排在未来的,根本不打算提交。解决方案:修复你的时钟,更改代码为以后不签名或稍后提交请求。