Here is my use case:
I have a scheduler
lamdba and a executor
lambda.
In the scheduler
lambda, I receive a list of (time, message)
tuples indicating that, at time
I would like to invoke the executor
lambda with event message
.
Here is what I have tried
- In the
scheduler
lambda, first clear all triggers from theexecutor
lambda. Then create a EventBridge scheduled event for each(time, message)
tuple. This has a few drawbacks...- It's quite difficult to remove all triggers from a lambda, as the Lambda API doesn't let you do that (I believe I have to do it through the EventBridge API with proper tagging)
- Adding and removing ~100 triggers every day seems uneconomical and is not the intended use case of event bridge
- Running a dedicated EC2 instance to call the lambda function
- I'm cheap and I don't want to pay for an instance that will lay idle for ~99.9% of the time.
- Not serverless
Is there a serverless way of trigger a lambda in a non-periodic fashion?