mjendza / aws-sandbox

This is my AWS Serverless stack. Build with CDK, NodeJS Lambda, DynamoDB storage.
Apache License 2.0
6 stars 1 forks source link

outbox pattern #30

Closed mjendza closed 3 years ago

mjendza commented 3 years ago

from http://www.kamilgrzybek.com/design/the-outbox-pattern/

With the DynamoDB stream:

stream: StreamViewType.NEW_AND_OLD_IMAGES,

and lambda handler:

lambda.addEventSource(
            new DynamoEventSource(users, {
                startingPosition: StartingPosition.LATEST,
            })
        );

we can publish accepted (confirmed by DynamoDB) changes in the Database and publish events like on the screen:

image