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?

feita há 2 anos343 visualizações
2 Respostas
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
ESPECIALISTA
Uri
respondido há 2 anos
  • 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
ESPECIALISTA
respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas