Skip to content

Instantly share code, notes, and snippets.

@siroken3
Last active January 1, 2016 10:09
Show Gist options
  • Select an option

  • Save siroken3/8129285 to your computer and use it in GitHub Desktop.

Select an option

Save siroken3/8129285 to your computer and use it in GitHub Desktop.
awscli+jqによる指定したインスタンスIDのタグ名の値を取得する
aws ec2 describe-instances | ¥
jq -r '.Reservations[].Instances[] | select(.InstanceId == "インスタンスID") | .Tags[] | select (.Key == "タグ名") | .Value'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment