0
0

More than 1 year has passed since last update.

ECS Execする時のコマンドをちょっと簡単にする

Posted at

使用方法

aws-ecs-exec Sample-Cluster task-id container-name

bash関数

function aws-ecs-exec() {
  command aws ecs execute-command --cluster $1 \
    --task $2 \
    --container $3 \
    --interactive \
    --command "/bin/sh"
}

説明

毎回コンテナに入るときのコマンドをぐぐりながらやってたので、bash関数化したら楽かなと思いました。
subnetの指定はいるんだっけ?とrun-taskとごっちゃになったりしてたので。。

--command "/bin/sh"この箇所は動いているDockerイメージによって変わると思うので適宜変更してください。

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