trigger lambda based on an event in a raw stream

0

I run a 3rd party application ton EC2 that produces a raw stream of its events. I want to trigger a certain action to take place (likely within a lambda) based on a certain event appearing in the stream. How do I do this? Is it a subscription of some sort (like RSS ?) or something else?

質問済み 2年前343ビュー
2回答
1

It depends on how you emit the events? Are you using EventBridge? SQS? Kinesis Data Streams? Each one of them have the option to trigger a Lambda function and also include a filter on the events.

profile pictureAWS
エキスパート
Uri
回答済み 2年前
  • The events come out of my 3rd party app, as a stream; It's a URL which resolves to a page of logs that automatically refreshes and updates when new events take place

  • Lambda function can trigger based of the services I listed above, or by calling the Invoke API. If 3rd party app makes calls to an http endpoint with the events, you can enable Lambda function URLs and point the events there. You can also place the Lambda behind an API Gateway and point the app to that endpoint.

0

If your application is writing to syslogs, then there is an open source tool from AirBnB that has a plugin to send syslogs to kinesis - https://medium.com/airbnb-engineering/introducing-syslog-to-aws-kinesis-via-osquery-da4fc19de5ce Once you are able to get the messages into a Kinesis Data Stream, then you can use the Kinesis Data Stream as an event source for Lambda, as Uri suggested above - https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html

You can also look at Logstash. Logstash has an input plugin for Syslogs - https://www.elastic.co/guide/en/logstash/current/plugins-inputs-syslog.html and an output plugin for Kinesis - https://github.com/samcday/logstash-output-kinesis

Disclaimer: I have not tested these open source tools myself so you need to try them out yourself and ensure they work for your use-case. Neither I nor AWS endorse any of these tools in any way.

profile pictureAWS
エキスパート
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ