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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠