LoginSignup
22
8

InvalidSignatureException: The request signature we calculated does not match the signature you provided. の解決

Last updated at Posted at 2019-09-03

AWSのアクセスキーによる認証で、以下のエラーが発生して1時間手こずったので備忘録。

InvalidSignatureException: The request signature we calculated does not match the signature you provided. 

原因は、AWSのアクセスキーの発行では、Access Key ID と Secret Access Key が発行されますが、
このとき発行された Secret Access Key が原因でした。

こちらにissueとしてもあがっていました。
https://github.com/aws/aws-cli/issues/602

it is still the case in June 2018 that secrets that have the slash (/) character in them may make the PHP client not work (PHP 7 on Windows 10 in my case), returning the signatures do not match error. In this situation, just generate another pair of keys that is safer.

Secret Access Key にスラッシュ(/)文字が含まれる場合、このエラーが発生することがあるそうです。
Base64のエンコードで問題が発生しているようです。

この状況での解決策は、アクセスキーの再生成です。

issueにも書かれているように、私も別のキーペアを生成し直すことで解決できました。

22
8
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
22
8