Possibly may be better to use SQS in this scenario. I think I understand your scenario. If you’re doing fan-out *and* needing them to be read in the right order, then you’re going to have issues anyway. DynamoDB Stream -> SQS FIFO queue would be an interesting pattern to then trigger from. You’ll have your event log, and then can fan out there.

Better to avoid locking by simply removing a record off the SQS queue and if it fails, pushing to a DLQ rather than trying to read from the DynamoDB.

Written by

ServerlessDays CoFounder (Jeff), ex AWS Serverless Snr DA, experienced CTO/Interim, Startups, Entrepreneur, Techie, Geek and Christian

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store