5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWS InvalidClientTokenId を解決したメモ

Posted at

configureを設定してもInvalidAccessKeyIdでエラーが出てしまう・・・・

$ aws configure
AWS Access Key ID [None]: XXXXXXXXX
AWS Secret Access Key [None]: XXXXXXXXX
Default region name [None]: XXXXXXXXX
Default output format [None]: XXXXXXXXX

$ aws s3 ls
An error occurred (InvalidAccessKeyId) when calling the ListBuckets operation: The AWS Access Key Id you provided does not exist in our records.

$ aws sts get-caller-identity
An error occurred (InvalidClientTokenId) when calling the GetCallerIdentity operation: The security token included in the request is invalid.

原因

aws_session_tokenが設定できていなかったことが原因でした。

$ cd ~/.aws
$ vim credentials

[default]
aws_access_key_id = XXXXXXXXX
aws_secret_access_key = XXXXXXXXX
aws_session_token=XXXXXXXXX

これで解決。

5
3
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
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?