Serverless Event Sourcing in AWS (Lambda, DynamoDB, SQS)

Why use CQRS/Event Sourcing?

LINK_CREATED
LINK_RATED
LINK_TAGGED
LINK_TITLE_UPDATED
LINK_IMAGE_UPDATED
USER_FOLLOWED
USER_UNFOLLOWED

Architecture Overview

Fig. 1— Architecture overview
Fig. 2 — aggregates
Fig. 3—Concurrent save operation

DynamoDB Event Store

Fig. 4— DynamoDB Item with a single event
Fig. 5— DynamoDB Item with multiple events

Projections & Process Managers

Fig. 6— message queue (source)

Code Structure

Fig. 7— The image is taken from this repository which presents a “Clear Architecture” concept

--

--

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