title: How to send alert based on log message on CloudWatch
body: <p>I have a lambda that sends to STDERR when a given operation fails, something like:</p>
  
  <pre><code>async function handler(event, context) {
    const success = do()
    if (success) {
      return { statusCode: 200 }
    }
    console.error('Failed :(')
    return { statusCode: 400 }
  }
  </code></pre>
  
  <p>This is very simplified, but you get the idea. Naturally, this message will appear on CloudWatch. I would like to know if it's possible (and how to) setup a CloudWatch Alarm to send me an email if this message shows up in my logs.</p>
  
  <p>I've read the docs about CloudWatch alarms, but It's very cluttered and hard to find anything there.</p>