LoginSignup
1
0

More than 3 years have passed since last update.

An error occurred (InvalidSignatureException) when calling the GetSecretValue operation: Signature expired:となった時の対応方法

Last updated at Posted at 2020-11-24

Secrets Managerからキーを取得しようとしたら怒られた

  • 環境
    • Windows10 Pro 64bit バージョン1909
    • aws-cli/2.1.3 Python/3.7.7 Windows/10 exe/AMD64
$ aws secretsmanager get-secret-value --secret-id hoge/ponsuke

An error occurred (InvalidSignatureException) when calling the GetSecretValue operation: Signature expired: 20201124T070055Z is now earlier than 20201124T070155Z (20201124T070655Z - 5 min.)

原因 : パソコンの時間がずれているから

数か月前から5分くらいずれているなぁって思っていた。
ドメインにも入っているのになんでかなぁと、放置していた。
Windows10になってからいまいちメニューがよくわからないから・・・なんつって。

対応 : パソコンの時間を修正する

  1. スマホの時間を確認する(スマホが正しい前提)
  2. Win + R で[ファイル名を指定して実行]ダイアログを表示
  3. timedate.cplを入力してEnter
  4. [日付と時刻の変更]ボタンでダイアログを表示して時間をスマホに合わせる
    • 前に見たとき変更できなかったような・・・気のせいかなぁ
    • image.png
# めでたくとれた
$ aws secretsmanager get-secret-value --secret-id hoge/ponsuke
{
    "ARN": "arn:aws:secretsmanager:ap-northeast-1:8xxxxxxxx:secret:hoge/ponsuke-6XXXXX",
    "Name": "hoge/ponsuke",
    "VersionId": "3-xxxx-xxx...",
    "SecretString": "{\"ponsuke\":\"tarou\"}",
    "VersionStages": [
        "AWSCURRENT"
    ],
    "CreatedDate": "2020-11-24T14:48:38.906000+09:00"
}
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0