If data in close proximity is upserting a particular record, say:
Write 1 (t=0) |
Write 2 (t=0.001) |
Write 3 (t=0.002) | ---> Event 1 on the stream
Write 4 (t=1.000) | ---> Event 2 event on the stream
Is there a way to delay the write to the stream for some fixed time window to allow for rapid updates and to not generate 3 events?
DynamoDB will create an event for each modification to your data, there is no way to avoid that. If you required, you'd need to write to SQS then consume from Lambda and squash the events, before writing a single one to DynamoDB.