LoginSignup
0
0

More than 3 years have passed since last update.

CodeBuild実行時に$(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)で発生したエラーの解決方法

Posted at

問題点

AWS CodeBuild実行時に

Running command $(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)

時に、An error occurred (AccessDeniedException) when calling the GetAuthorizationTokenと言われてこけてしまった。

実行結果
スクリーンショット 2020-11-20 14.49.01.png

なぜ起こったのか?

CodeBuild実行時にECRを操作する権限がアタッチされていなかったから。

解決方法

手順_01

CodeBuild > ビルドプロジェクト > 該当プロジェクトの詳細を表示からビルドの詳細 > 環境サービスロールを確認

サービスロールのリンクからIAM Management Consoleへ行く

手順_02

ポリシーのアタッチからAmazonEC2ContainerRegistryPowerUserをアタッチする

手順_03

ビルドを再試行して実行できることを確認する

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