9

I am trying to retrieve a list of servers using the AWS CLI tools. I have 2 groups of servers, 1 will have the string "mind" in the Name tag, another group will have the string "intelligence" in the Name tag.

I can filter the output of DescribeInstances using wildcards but can I return instances that contain mind OR intelligence? in the Name?

Currently I have to run the command twice replacing the filter Value.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Dan P
  • 183
  • 3
  • 8

1 Answers1

17

You can supply multiple values for a tag. I think something like this would work for you:

aws ec2 describe-instances --filters Name=tag:Name,Values=mind,intelligence
garnaat
  • 44,310
  • 7
  • 123
  • 103