title: How to trigger a Lambda with error info from AWS Lambda Error in logs
body: <p>my end goal is to have a Notification Lambda that is triggered when any other lambda has an error.  I want this Notification Lambda to receive the logged error and to send out a notification such as an email with the problem lambda name + the error message.  Ideally I'd like a link to the log location in the AWS console, but that seems a stretch.</p>
  
  <p>Cloudwatch logs have errors like:</p>
  
  <pre><code>{
    "errorMessage": "2020-02-20T16:13:04.888Z abca3f75-d37f-4f3a-88f4-3d1ef49bb285 Task timed out after 3.00 seconds"
  }
  </code></pre>
  
  <p>I have been trying to set up a cloudwatch event rule that is triggered on a filter for a lambda that contains the text "errorMessage" and passes on the error message to the Notification Lambda.</p>
  
  <p>I have not been able to get anything to work.  Could someone point me to the correct way to write an cloudwatch event rule that filters for a) lambda b) the text "errorMessage" and passes on the error message + ideally the lambda name to a topic or directly to a lambda?</p>
  
  <p>All the examples I see to solve this problem are using alarms which only pass information about the alarm, not the actual problem.</p>
  
  <p>I want to set this all up in code, but a first step just getting it running via the console would be ok too.</p>
  
  <p>thanks!</p>