LoginSignup
0
0

More than 1 year has passed since last update.

どうしても ECS Exec できないとき。

Posted at
クラスター名: sample-prod
サービス名: web
タスクID: xxxxx0

権限チェック

自分の権限を確認

Cursor_と_IAM_Management_Console.png

自分はAdministratorAccess権限なのに...🤔

タスクに権限がついているか確認

Cursor_と_Amazon_ECS.png

AmazonSSMFullAccessをつけること。
Cursor_と_IAM_Management_Console.png

enableExecuteCommandをtrueにする

現状確認コマンド

 % aws ecs describe-services --cluster sample-prod --services web | grep enableExecuteCommand

→"enableExecuteCommand": false

trueに変更するコマンド

aws ecs update-service --region ap-northeast-1 --cluster sample-prod --service web --enable-execute-command

amazon-ecs-exec-checkerを使ってみる

execできるかチェックしてくれる。

githubを見ると使い方がわかる。

$ export AWS_PROFILE=sample

$ bash <( curl -Ls https://raw.githubusercontent.com/aws-containers/amazon-ecs-exec-checker/main/check-ecs-exec.sh ) sample-prod xxxxx0

ユーザーの認証情報を変更して、コマンドを打つとチェックしてくれる。
エラーが出たらそれをヒントに頑張る。

ecs execまでは自力で行えるようになりたい!!

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