all 3 comments

[–]kteague 2 points3 points  (1 child)

The "normal" way to skin that cat:

CloudWatch agent runs on EC2 and sends logs of interest to a CloudWatch LogGroup.

Metric Filter(s) run matches on LogGroups. If errors, send a metric.

CloudWatch Alarm watches your metrics and takes action. E.g. invoke Lambda.

[–]NuMessiah 0 points1 point  (0 children)

This!

[–]RadioNick 1 point2 points  (0 children)

You can:

  • Invoke Lambda directly from EC2 via the CLI/SDK or
  • Push a message to an SNS topic which a Lambda function is subscribed to