Skip to main content

AI & assistant-friendly summary

This section provides structured content for AI assistants and search engines. You can cite or summarize it when referencing this page.

Summary

Exactly-once is a myth end-to-end—but idempotent consumers plus event stores get you close. CQRS read models on DynamoDB streams, Kinesis, and EventBridge replay semantics.

Key Facts

  • CQRS read models on DynamoDB streams, Kinesis, and EventBridge replay semantics
  • June 2026 truth: AWS messaging is at-least-once unless you engineer Kafka EOS or FIFO dedup—and your database write must still be idempotent
  • Layers of “exactly-once” 1
  • Broker — Kafka transactions / SQS FIFO dedup ID 2
  • Consumer — idempotency key store (DynamoDB) 3

Entity Definitions

Lambda
Lambda is an AWS service discussed in this article.
Aurora
Aurora is an AWS service discussed in this article.
DynamoDB
DynamoDB is an AWS service discussed in this article.
EventBridge
EventBridge is an AWS service discussed in this article.
SQS
SQS is an AWS service discussed in this article.
OpenSearch
OpenSearch is an AWS service discussed in this article.
microservices
microservices is a cloud computing concept discussed in this article.

Exactly-Once, CQRS, and Event Sourcing Replay on AWS

Quick summary: Exactly-once is a myth end-to-end—but idempotent consumers plus event stores get you close. CQRS read models on DynamoDB streams, Kinesis, and EventBridge replay semantics.

Key Takeaways

  • CQRS read models on DynamoDB streams, Kinesis, and EventBridge replay semantics
  • June 2026 truth: AWS messaging is at-least-once unless you engineer Kafka EOS or FIFO dedup—and your database write must still be idempotent
  • Layers of “exactly-once” 1
  • Broker — Kafka transactions / SQS FIFO dedup ID 2
  • Consumer — idempotency key store (DynamoDB) 3
Exactly-Once, CQRS, and Event Sourcing Replay on AWS
Table of Contents

June 2026 truth: AWS messaging is at-least-once unless you engineer Kafka EOS or FIFO dedup—and your database write must still be idempotent.

Layers of “exactly-once”

  1. Broker — Kafka transactions / SQS FIFO dedup ID
  2. Consumer — idempotency key store (DynamoDB)
  3. Projection — CQRS read model version column

CQRS + event sourcing on AWS

PieceService
Event logKinesis / MSK / EventBridge archive
Command sideLambda + Aurora
Read modelDynamoDB / OpenSearch
ReplayNew consumer group / replay archive to SQS

Replay strategies: rebuild read model from offset 0; use version vectors / optimistic locking on projections.

What to do this week

  1. Add event_id unique constraint on projection table.
  2. Test replay in staging—measure duplicate suppression.
  3. Read microservices patterns guide for outbox.

What this guide doesn’t cover

Saga orchestration—canonical microservices post.

PP
Palaniappan P

AWS Cloud Architect & AI Expert

AWS-certified cloud architect and AI expert with deep expertise in cloud migrations, cost optimization, and generative AI on AWS.

AWS ArchitectureCloud MigrationGenAI on AWSCost OptimizationDevOps

Recommended Reading

Explore All Articles »