title: How can I filter by Fargate service in event bridge pattern?
body: <p>I have an Eventbridge rule which trigger a lambda function every time a task crashed in the cluster <code>PRODUCTION</code>.
  The issue is that I want to monitor only tasks running in the specific service <code>backendPRODUCTION</code>.
  I didn't find any template specifying an ECS service with Eventbridge. How can I trigger my lambda function only for tasks running in the specific service <code>backendPRODUCTION</code>?</p>
  <p>Thanks in advance!</p>
  <pre><code>{
    &quot;source&quot;: [&quot;aws.ecs&quot;],
    &quot;detail-type&quot;: [&quot;ECS Task State Change&quot;, &quot;ECS Container Instance State Change&quot;],
    &quot;detail&quot;: {
      &quot;clusterArn&quot;: [&quot;arn:aws:ecs:eu-west-3:xxxxxxxxxxxx:cluster/PRODUCTION&quot;],
      &quot;lastStatus&quot;: [
        &quot;STOPPED&quot;
      ],
      &quot;stoppedReason&quot;: [
        &quot;Essential container in task exited&quot;
      ]
    }
  }
  </code></pre>