LoginSignup
0
0

More than 3 years have passed since last update.

AWS CLIでECSタスクを止める

Posted at

コマンド

$ aws ecs stop-task --cluster {クラスタ名} --task $(aws ecs list-tasks --cluster {クラスタ名} --query "taskArns[0]" --output text)

参考

--output textを指定することでダブルクォートを排除できるため、| sed -e 's/"//g'などsedを使う必要がない。

AWS CLI からのコマンド出力の制御 - AWS Command Line Interface
https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/cli-usage-output.html

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