1
1

More than 1 year has passed since last update.

CLIが利用できない初歩的な見落とし

Last updated at Posted at 2021-12-20

①エラー

An error occurred (InvalidClientTokenId) when calling the GetCallerIdentity operation: The security token included in the request is invalid.

②対処

rm -r ~/.aws
aws sts get-caller-identity

③解説

aws configureを見てみると過去に手動で入力した一時的なキー情報などが記載されているとそちらのキー情報を読み取るためエラーになることがあります。

そういう時は②を参考にaws configureの設定削除を行ってみましょう
また、再設定したい場合は

 aws configure

※補足
以下のエラーでも上記内容が原因の可能性があります。
ポリシーが足りてないのでは?とか考えてしまいますがそうでないかもしれません

An error occurred (InvalidAccessKeyId) when calling the ListBuckets operation: The AWS Access Key Id you provided does not exist in our records.
1
1
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
1