sqs-worker-serverless icon indicating copy to clipboard operation
sqs-worker-serverless copied to clipboard

Reduce worker costs when queue is empty

Open mattmeye opened this issue 6 years ago • 2 comments

Hello,

actually the worker-function is also invoked when the queue is empty. I think it would be better to control the active field of the rate-rule depending on a cloudwatch alarm too.

Inital: Rate is deactivated Zero Messages => Deactive AWS::Events:Rule One or more Messages in the Queue => Activate AWS::Events:Rule

What do you think?

mattmeye avatar Jun 25 '18 08:06 mattmeye

off topic: it is also possible to save the scale factor into the worker function env or as a tag to any resource. Then the config db is no longer needed

mattmeye avatar Jun 25 '18 08:06 mattmeye

ok, actually aws lambda can be triggered directly via sqs queue, no workaround necessary

mattmeye avatar Jul 03 '18 20:07 mattmeye