LoginSignup
1
0

More than 5 years have passed since last update.

表示名(tag:Name)に任意の文字列が含まれた停止済みのEC2インスタンスの一覧を表示するコマンド

Posted at

ドンピシャなコマンドが探しても見当たらなかったので

aws --profile [プロファイル名] ec2 describe-instances \
--query 'Reservations[].Instances[].Tags[?Key==`Name`].Value[]' \
--filter "Name=instance-state-name,Values=stopped"  "Name=tag:Name,Values=*[任意の文字列]*"| sort
1
0
2

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
1
0