title: Trigger ECS Task from S3 Event
body: <p>I want to trigger an ECS task when a file lands in an S3 bucket.  I tried using a Cloudwatch rules on an S3 event but it seems to require either a specific file in a specific location or triggers on file arrival in the entire bucket, no wildcards/prefixes/suffixes to control soemthing between those two extremes.</p>
  
  <p>I've also tried triggering off of an SNS topic but can't seem to get the syntax right to work off my specifc topic.  Heres what I have so far:</p>
  
  <pre><code>{
   "source": [
     "aws.sns"
   ],
   "detail-type": [
     "AWS API Call via CloudTrail"
   ],
   "detail": {
     "eventSource": [
       "sns.amazonaws.com"
     ],
     "EventSubscriptionARN": [
       "arn:aws:sns:us-east-1:123456789123:WCIS_ECS_Test:xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
     ],
     "TopicARN": [
       "arn:aws:sns:us-east-1:123456789123:My_Topic"
     ],
     "eventName": [
       "Publish"
     ]
   }
  </code></pre>
  
  <p>}</p>
  
  <p>If anyone can help sort oout the syntax of this it would awesome, or alternatively, if there's another pattern I should be looking at, that suggestion would be awesome too.</p>