ECSのFargateにログインする方法

ECS Execの事前確認

aws ecs describe-tasks --region リージョン名 --cluster クラスター名 --task タスク名 | grep enableExecuteCommand

ECS Execの有効化

aws ecs update-service --region リージョン名 --cluster クラスター名 --service サービス名 --enable-execute-command

ECS Execの確認

aws ecs describe-tasks --region リージョン名 --cluster クラスター名 --task タスク名 | grep enableExecuteCommand

Fargateのコンテナへログインする

aws ecs execute-command --region リージョン名 --cluster クラスター名 --task タスクID --container コンテナ名 --interactive --command "/bin/bash"

コメント

タイトルとURLをコピーしました