AWS in 1 Min · Episode 184

Event-driven architecture on AWS, explained simply

React to what happened. Watch the one-minute video, then read the details.

David Gomez1:10 video · 2 min read

"Apps must keep asking if something changed." Not with events. Polling, where a service checks a database or an API every few seconds for new work, burns compute asking the same question over and over, and still reacts late: on average, half a polling interval after the change. In an event-driven architecture, the change itself announces that it happened.

Events, producers, routers, consumers

An event is a small record of a fact: order placed, file uploaded, payment failed. AWS describes event-driven architecture as using events to trigger and communicate between decoupled services, with three parts:

  • Producers emit events when something happens: your app, or AWS services like S3 or EC2.
  • Routers filter events and deliver them to whoever is interested: Amazon EventBridge, SNS topics, or streams like Kinesis.
  • Consumers act on them: a Lambda function, a container, a Step Functions workflow.

Why it works

  • Producers don't know the consumers. To add fraud scoring when an order is placed, you add a consumer and a rule. The order service doesn't change at all. That's loose coupling in its purest form.
  • Work is asynchronous. Each consumer scales with its own load and fails on its own, without blocking the producer.
  • Nothing runs while nothing happens. With push-based delivery and serverless consumers, quiet hours cost almost nothing, unlike servers that poll all night.

A useful distinction: in choreography, services react to each other's events with no central controller; in orchestration, a workflow such as Step Functions calls the steps in order. Most real systems use both: events between domains, a workflow inside a multi-step process.

The catch: duplicates and ordering

Event systems trade certainty for resilience. Most deliver at least once: an SQS standard queue, for example, can occasionally deliver a message more than once and doesn't guarantee order, and retries after a timeout can repeat an event that was already handled. So:

  • Make consumers idempotent: processing the same event twice must have the same effect as once. Store a processed event ID, or use conditional writes.
  • Don't assume order. Carry a timestamp or version in the event, or use FIFO queues where order truly matters.
  • Send events that keep failing to a dead-letter queue instead of losing them.

The most common mistake is the double charge: a payment consumer that runs twice on a retried event. Idempotency is not optional.

Where AI fits

Event-driven architecture is the natural shape for AI agents. An agent shouldn't sit in a loop asking "is there work?". An event, such as a new support ticket, an uploaded contract or a failed deployment, wakes the agent with the event as its context. The agent does its work, and its results become new events: ticket triaged, contract summarised, fix proposed. Other services, other agents, or a human approval step react to those in turn. Each step stays small, observable and replaceable, and the same idempotency rule applies: an agent run triggered twice must not act twice.

Quick recap

  • React, don't poll: events announce changes when they happen.
  • Producers, router, consumers: producers never need to know who listens.
  • Handle duplicates: idempotent consumers, no ordering assumptions, dead-letter queues.
AWS in 1 Min #184 · 1:10

Need an AWS expert on your team?

I'm David, an AWS expert and fractional cloud consultant. I work alongside your team to run your cloud and infrastructure: architecture, security, cost and day-to-day operations. You get senior AWS experience when you need it, without the cost of a full-time hire.

  • Architecture reviews and a clear plan for what to fix first
  • Security hardening: IAM, networking, audits
  • Lower AWS bills without slowing your team down
  • Hands-on help with AI workloads on AWS