sqs-worker-serverless
sqs-worker-serverless copied to clipboard
Reduce worker costs when queue is empty
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?
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
ok, actually aws lambda can be triggered directly via sqs queue, no workaround necessary