title: Filter EC2 Instance with "DescribeInstanceStatus" routine - AWS SDK
body: <p>I'm trying to filter EC2 instances using the AWS SDK in .NET and, although I have seen inumerous threads on SO and on other websites of people resolving this issue, nothing I've tried on my end worked.</p>
  
  <p>So, as a last resource, I'm coming to you guys for help. Can anyone shed some light on what I'm missing ? I know it's very likely that I'm doing something stupid, but I can't afford to waste too much time solving this issue.</p>
  
  <p>This is the chunk of code I'm using to filter an EC2 instance (get it's metadata) by it's tag name:</p>
  
  <pre><code>DescribeInstanceStatusRequest req = new DescribeInstanceStatusRequest ();
  req.Filters.Add (new Filter() { Name = "tag:Name", Values = new List &lt;string&gt; () { "some_random_name" } });
  
  // Executing request &amp; fetching response
  DescribeInstanceStatusResponse resp = m_ec2Client.DescribeInstanceStatus (req);
  </code></pre>
  
  <p>But I keep on running into this exception:</p>
  
  <blockquote>
    <p>The filter 'tag:Name' is invalid</p>
  </blockquote>
  
  <p>I have replaced the filter name ("tag:Name" in the example) by several filters listed in the documentation (e.g. "tag-key", "tag-value", "tag:key=value"), but nothing works.</p>
  
  <p>Thank you all in advance :)</p>