LoginSignup
0
0

More than 1 year has passed since last update.

[Github_Actions][error]User: arn:aws:iam::<AcountID>:user/<IAM User Name>is not authorized to performの解決例

Last updated at Posted at 2021-10-31

エラーの様子

下記のように題名のエラーを吐いた。
スクリーンショット 2021-11-01 7.31.06.png

原因

github用のiam_roleのaccess_key_id,secret_key_idを通常のawsアカウントのもので環境変数に登録してしまったから。(画像では***になっている部分)

解決法

下記コマンドで該当のiam_roleのaccess_key_id,secret_key_idを確認する→それを環境変数に登録する

% aws iam get-account-authorization-details

access_keyがなければ下記コマンドで生成する。

% aws iam create-access-key --user-name example-prod-foobar-github

その他の原因

AssumeRoleする際にセッションタグを渡せるようにする。(github用のiam_roleにその権限を持たせる)
この解決方法は下記の記事がとても参考になった。

0
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
0
0