はじめに
dockerコンテナ上のaws-cli環境でaws sts get-caller-identity
をしたら、時間がずれてるとおこられたので、また起きた時用メモ。
どうしてかわかんないけど、こうなった
① An error occurred
root@xxxxxxx:/home# aws sts get-caller-identity
An error occurred (SignatureDoesNotMatch) when calling the GetCallerIdentity dentity operation: Signature expired: 20200323T231737Z is now earlier200324T0 than 20200324T002325Z (20200324T003825Z - 15 min.)
② 本当にずれてるのか確認してみる。ちなみにこの時午前10時ちょっと前。
root@xxxxxxx:/home# date
Fri Apr 02 23:30:39 UTC 2020
③ UTCだとよく分からないからJSTに変えてみる。
root@xxxxxxx:/home# TZ=-9 date '+%a %b %d %H:%M:%S JST %Y'
root@xxxxxxx:/home# date
Fri Apr 03 08:33:30 JST 2020
ずれてた。1時間半も。
修正方法
1. 検索ボックスに「Hyper-V マネージャー」を入力して選択。
3. 管理 の 統合サービスを選択して「時刻の同期」にチェックを入れる。
(※もともとチェックが入っている時は一度外して適用。その後チェックを入れてもう一度適用。)
おわりに
この後、エラーが消えて解決!めでたし!