amit kumar
amit kumar

Reputation: 121

can i trigger event after receiving message on sqs without using any lambda?

I have tried to do some R&D but i couldn't find anything useful the only thing that i found is lambda functions is the only way. I want to write a simple application that execute when the Simple Queue Service receive any message , but i couldn't find a way to do that till now, since i don't want to use lambda. for example if i receive some message on Simple Queue Service and while receiving each messages i can trigger a event that is not lambda but instead of that any HTTP-request.

Upvotes: 1

Views: 4878

Answers (2)

srikrishna turlapati
srikrishna turlapati

Reputation: 49

A short answer to your question is No, (until today) Let me tell you the sineros i faced.In general Queue triggering lambda is widely used and for that u have to make sure about proper concurrency (minimum 5) in place and also database I/O if u are performing and any DB calls . But I've a scenario where we cannot use "lambda as a triggering service" as our DB is onprem "ORACLE" so the choices are .

  1. Push to "SNS" and make http "what ever applies"(to a container we have custom Kubernetes routed through NLB ).Also make sure you push a batch of messages as it might make more http noise.

2.Poll the queue and perform the operations.

  1. SQS triggering => Lambda and lambda invoking state machine (step functions)

Upvotes: 0

E.J. Brennan
E.J. Brennan

Reputation: 46841

I think your choices are:

  • use lambda (which you said you didn't want to use, but its probably the best solution)
  • use your own app running on ec2 or even on premise to consume the message and invoke the http endpoint
  • use SNS instead of SQS for message delivery - SNS supports http endpoints.

You can use Amazon SNS to send notification messages to one or more HTTP or HTTPS endpoints. When you subscribe an endpoint to a topic, you can publish a notification to the topic and Amazon SNS sends an HTTP POST request delivering the contents of the notification to the subscribed endpoint. When you subscribe the endpoint, you select whether Amazon SNS uses HTTP or HTTPS to send the POST request to the endpoint.

from here: https://docs.aws.amazon.com/sns/latest/dg/sns-http-https-endpoint-as-subscriber.html

Upvotes: 2

Related Questions