You can change the recording method in the application so that your application tracks the propagation delay of mutations in the table stream. For example, when creating and updating items, you can always update the timestamp last_updated = attribute. That way, when your creations and updates appear on the stream, you can estimate the propagation delay by subtracting the current time from last_updated in the NEW_IMAGE stream record.
Since exceptions do not have NEW_IMAGE entries in threads, your deletion must be done in two steps:
- logical deletion when you write 'logically_deleted =' timestamp to an element and
- physical deletion when you actually call DeleteItem right after 1.
Then you should use the same math as for creating and updating, only the difference is that you will use OLD_IMAGE when processing deletions, and you will need to subtract at least about 10 ms to take into account the time it takes to execute logical delete (step 1).
source share