Hi there, anyone has experience scheduling lambda invocations with second precision? As far as I know, dynamo ttl is always a couple minutes late and the Cron construct (which uses EventBridge) is minute precision. I need something that invokes a lambda with second or sub-second precision. Any ideas?
g
gio
01/04/2022, 4:45 PM
I use AWS StepFunction, put a Wait state before a Task
t
thdxr
01/04/2022, 4:45 PM
People have done this with funny stepfunctions that sleep every second
thdxr
01/04/2022, 4:45 PM
bingo
a
Adam Fanello
01/04/2022, 4:48 PM
There are many blogs with various techniques. You should be able to find them by Googling. Don't count on DynamoDB TTL for accuracy under four hours - it's usually faster but that's the guarantee level.
A good technique that is easier/cheaper than step function is a scheduled EventBridge once a minute that then shoves the events for the next minute or fifteen into an SQS queue with delay to obtain per-second resolution.