---
title: "Utilizing Amazon DynamoDB and AWS Lambda for Asynchronous Event Publication"
description: "Zalando Payments decoupled event publication from synchronous DynamoDB writes in its Order Store service using the Transactional Outbox pattern, removing the message bus from the request path and raising the availability ceiling from 99.8% to DynamoDB's own."
url: "https://swe.quest/articles/utilizing-amazon-dynamodb-and-aws-lambda-for-asynchronous-event-publication-b54b04cd8273be4a"
canonical: "https://engineering.zalando.com/posts/2022/02/transactional-outbox-with-aws-lambda-and-dynamodb.html"
source: "Zalando Engineering"
published: "2022-02-02"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["event-driven","cloud","serverless","resilience","microservices"]
---

# Utilizing Amazon DynamoDB and AWS Lambda for Asynchronous Event Publication

A post on [Zalando Engineering](https://swe.quest/sources/zalando.md), published 2022-02-02, 5 min read, Case study. Original: [https://engineering.zalando.com/posts/2022/02/transactional-outbox-with-aws-lambda-and-dynamodb.html](https://engineering.zalando.com/posts/2022/02/transactional-outbox-with-aws-lambda-and-dynamodb.html)

## Summary

Zalando Payments decoupled event publication from synchronous DynamoDB writes in its Order Store service using the Transactional Outbox pattern, removing the message bus from the request path and raising the availability ceiling from 99.8% to DynamoDB's own. DynamoDB Streams act as the outbox, emitting old and new item images to a Python AWS Lambda that builds a data-change event with a diff patch and publishes it to Nakadi. Failed publishes retry with exponential backoff, then land in an SQS dead letter queue that a Kubernetes CronJob drains by rerunning the same code. The tradeoff is that event ordering is no longer guaranteed.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Event-driven architecture](https://swe.quest/tags/event-driven.md) (Backend & APIs)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Resilience](https://swe.quest/tags/resilience.md) (Distributed systems)
- [Microservices](https://swe.quest/tags/microservices.md) (Backend & APIs)

## Prerequisites

- event-driven microservices ([easy posts on Microservices](https://swe.quest/tags/microservices.md?difficulty=easy))
- AWS DynamoDB basics ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- message queues ([easy posts on Queues & messaging](https://swe.quest/tags/messaging.md?difficulty=easy))

## Keywords

Transactional Outbox, DynamoDB Streams, AWS Lambda, Amazon SQS, Nakadi, Kubernetes CronJob, Zalando

## Related posts

- [From Event-Driven Chaos to a Blazingly Fast Serving API](https://swe.quest/articles/from-event-driven-chaos-to-a-blazingly-fast-serving-api-515d5b06058dbe2a.md): Zalando Engineering · 2025-03-06 · Medium · 8 min read · Caching, Load balancing, Event-driven architecture, Performance engineering, E-commerce
  Zalando replaced an event-driven pipeline that merged Product, Price and Stock events with a central Product Read API (PRAPI).
- [Inside Laravel Nightwatch’s Observability Pipeline: Real-Time Event Processing with Amazon MSK and ClickHouse Cloud](https://swe.quest/articles/inside-laravel-nightwatch-s-observability-pipeline-real-time-event-processing-2274d87b280c63f4.md): ClickHouse · 2025-10-08 · Easy · 5 min read · Observability, Analytics & OLAP, Queues & messaging, Cloud platforms, System design
  Laravel Nightwatch, Laravel's first-party observability platform, ingests telemetry through API Gateway and Lambda into Amazon MSK Express brokers, then streams it into ClickHouse Cloud via ClickPipes, with materialized views pre-aggregating raw JSON.
- [Service disruption on October 20, 2025](https://swe.quest/articles/service-disruption-on-october-20-2025-fe786fa7dabbc413.md): incident.io · 2025-10-22 · Medium · 12 min read · Incidents & postmortems, Resilience, PostgreSQL, CI/CD, Cloud platforms
  The October 20, 2025 AWS us-east-1 outage degraded incident.io through third-party dependencies even though it runs on Google Cloud: its transcription, SAML, telecom and status page providers were all affected.
- [Evolving the Backend Storage for Platform Metrics](https://swe.quest/articles/evolving-the-backend-storage-for-platform-metrics-0fb82a7939c98396.md): Heroku Engineering · 2024-05-09 · Medium · 6 min read · Databases, Distributed databases, Observability, Cloud platforms, Schema migrations
  Heroku migrated the time-series store behind MetaaS, its internal metrics service, from self-managed Apache Cassandra to AWS DynamoDB without user-visible impact.
- [Ensuring reliable OpenTelemetry ingestion at scale](https://swe.quest/articles/ensuring-reliable-opentelemetry-ingestion-at-scale-ef5f46f7e6587da0.md): ClickHouse · 2026-08-24 · Medium · 12 min read · Observability, Resilience, Data pipelines, Cloud platforms, Kubernetes
  ClickHouse's LogHouse OpenTelemetry pipeline, ingesting 50 million events per second, absorbs database backpressure by failing over to S3 rather than buffering in memory, local WALs or Kafka.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
