From what I know, Lambdas are for listening to events and running a piece of code on response to those events.
The events need to be AWS services or HTTP endpoints. If I have a RabbitMq service running on an EC2 server (Not using SQS), is it possible to have a consumer deployed on Lambda?
If possible, would this be the right thing to do?
Also, since lambdas are billed on compute time, I shouldn't be billed for when the queue is idle, right?
Amazon MQ now supports RabbitMQ, a popular open source message broker. This enables you to migrate your existing RabbitMQ message brokers to AWS without having to rewrite code.
As I understand, both AWS MQ and AWS SQS are Message Queue tools. The only noted difference is that SQS is fully managed.
You can probably install this on the same server as the rabbitMQ, and make it trigger the lambdas. I haven't tried myself though https://github.com/AirHelp/rabbit-amazon-forwarder
As far as I understand, lambdas are billed by the running time, and you pay based on amount of memory (per gigabyte/second). So making a lambda wait all the time will probably be pretty expensive and hard to manage since it will time out. If you already have a server with RabbitMQ, use that for consuming the queue and calling the lambdas.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With