Aleix's Learnings

Share this post
DynamoDB as EventStore
learnings.aleixmorgadas.dev

DynamoDB as EventStore

Aleix Morgadas
Aug 11, 2021
Share this post
DynamoDB as EventStore
learnings.aleixmorgadas.dev
practical-dev

I would like to share with you how I managed to deploy a solution to store Domain Events in DynamoDB in 2 days (and mostly because of AWS permission issues...😅).

I wanted a solution to store how the user interacted with different Domain Models and decouple that storage from the monolithic so they can grow independently. I aimed to create something super simple, or at least not that complex, in 2 to 3 days.

I wanted to process events as:

Monolith sends message to ➡️ SQS ➡️ Triggers Lambda to store it into ➡️ DynamoDB Table

Even though DynamoDB might not be an optimal solution to be used as Event Store, I have given it a try for the next reasons:

  • It is fully managed by AWS

  • It is cheap enough

  • We don't require high write throughput nor read for the moment.

  • Able to encrypt the content

Implementation

I decided to go with:

  • Terraform as Infrastructure as Code

  • Python for AWS Lambda

You can find the source code here 😊

Ready to be deployed into your cloud solution 💪😁

Share this post
DynamoDB as EventStore
learnings.aleixmorgadas.dev
Comments

Create your profile

0 subscriptions will be displayed on your profile (edit)

Skip for now

Only paid subscribers can comment on this post

Already a paid subscriber? Sign in

Check your email

For your security, we need to re-authenticate you.

Click the link we sent to , or click here to sign in.

TopNewCommunity

No posts

Ready for more?

© 2022 Aleix Morgadas
Privacy ∙ Terms ∙ Collection notice
Publish on Substack Get the app
Substack is the home for great writing