Event Sourcing with AWS Lambda

Paul Bourdel
Slalom Build
Published in
9 min readDec 17, 2018

--

Overview

This article will explore one possible way to implement the event sourcing pattern in AWS using AWS services. Event sourcing is a pattern that involves saving every state change to your application allowing you to rebuild the application state from scratch via event playback.

When to Use

Event sourcing adds extra complexity to your application and is overkill for many use cases but can be invaluable in the right circumstances. The following are some instances of when you would want to implement the event sourcing pattern.

  • When you need an audit log of every event in the system or micro service as opposed to only the current state of the system.
  • When you need to be able to replay events after code bug fixes to fix data.
  • When you need to be able to reverse events.
  • When you want to use the Event Log for debugging.
  • When it’s valuable to expose the Event Log to support personnel to fix account specific issues by knowing exactly how the account got into a compromised state.
  • When you want to create test environments from the event log. Having the event log can allow you to create environments based on the state of the system at different points in time by replaying only a subset of events.

Event Sourcing Deep Dive

Event sourcing stores every state change to…

--

--

Paul Bourdel
Slalom Build

Staff Engineer/Consultant/Architect. Any views or statements expressed are mine and not necessarily those of my employer.