Project

Real-Time Operations Dashboard

This AWS architecture is fully designed and documented below, but intentionally not deployed — Kinesis Data Streams bills per shard-hour (~$15–20/month minimum) even at idle, which isn't justified for a portfolio demo. The chart below is driven by a simulated event stream running entirely in your browser.

Kinesis Data Streams ingests a continuous flow of events, a Lambda consumer aggregates them in near real time, and DynamoDB holds the rollups a dashboard can poll — the same shape as a production operations or observability dashboard, minus the always-on infrastructure bill.

Demo

Simulated Event Stream

This runs entirely in your browser — no Kinesis stream, no Lambda, no network request of any kind. Starting it spins up an in-page interval that manufactures synthetic events and redraws the charts below from a rolling in-memory buffer, the same shape the real Lambda aggregator would produce from a live stream.

Privacy notice: nothing is collected or sent anywhere — every event lives only in this browser tab's memory and disappears on refresh.

Start the simulated stream to see the dashboard fill in.

Architecture

How This Would Work, If Deployed

This is a reference architecture, not a mockup — every resource below is real, compilable CDK code. It's simply never instantiated, so nothing here has ever run against a live AWS account. Click any icon to jump to that step, or let it play through on its own.

Producers
Kinesis Data Stream
Lambda (aggregation)
DynamoDB (rollups)
API Gateway
  1. 1

    Producers write to a Kinesis Data Stream

    Any number of producers — application servers, IoT devices, other Lambdas — call PutRecord/PutRecords with a small JSON event. Kinesis retains records in order, per shard, for a configurable window (24 hours by default).

  2. 2

    A Lambda consumer aggregates each batch

    An EventSourceMapping invokes a Lambda function with a batch of records at a time. The function base64-decodes and parses each record, groups them by category, and applies atomic ADD updates to DynamoDB counters rather than read-modify-write cycles, so concurrent batches never clobber each other's counts.

  3. 3

    DynamoDB holds the current rollups

    One item per category, each with a running count and a last-updated timestamp — cheap to read, cheap to update, no idle capacity to pay for on-demand billing.

  4. 4

    The dashboard polls a read API

    A separate, unauthenticated GET /rollups route behind API Gateway returns the current DynamoDB rollups as JSON. The dashboard polls it on an interval and redraws its charts — the same shape as the simulated version above, just fed by real data instead of an in-browser random generator.

Use Cases

Where This Pattern Fits

Kinesis earns its keep anywhere a high volume of small events needs to be ingested in order and aggregated continuously, rather than processed one request at a time.

Operational metrics & observability

Request logs, error events, and latency samples streamed from many services into one place a dashboard can aggregate and chart in near real time.

Clickstream & IoT telemetry

High-volume, low-per-event-value data — page views, sensor readings — where ordered ingestion and downstream fan-out matter more than any single event's individual latency.

Anomaly & fraud detection pipelines

Kinesis's ordered, replayable stream lets multiple independent consumers — an aggregator, an anomaly detector, an archival job — each process the exact same event sequence at their own pace.

Pricing

What This Would Cost, If Deployed

This project is never actually deployed (see the notice at the top of this page), so nothing here is billing you anything. These are estimates based on public AWS list pricing for what running this continuously would cost.

One shard, idle

~$15/mo

A single Kinesis shard costs about $0.015/hour (~$11/month) whether or not any events arrive, plus a small PUT payload charge — this is the floor, not the ceiling.

Ingestion volume

What drives the cost

  • Kinesis Data Streams — billed per shard-hour regardless of traffic, plus a small per-million-records PUT payload charge; more shards means more parallel throughput, and more flat monthly cost.
  • Lambda — the aggregation consumer is billed per invocation and per millisecond, batched, so cost tracks event volume closely.
  • DynamoDB — on-demand billing for a handful of rollup counters; effectively free at this scale.
  • API Gateway — billed per request on the read route the dashboard polls.

Design Decisions

Why I Designed It This Way

A few choices here aren't the only way to build this — here's the reasoning behind them.

Kinesis, not SQS, for ingestion

SQS is a great fit for the fan-out project elsewhere in this portfolio, but it doesn't preserve strict ordering across multiple consumers or let more than one independent consumer replay the exact same sequence of events. Kinesis's ordered, replayable shard model is the right tool once "aggregate this stream" might later mean two or three different downstream consumers reading it independently.

Atomic counter updates, not read-modify-write

With many Lambda invocations processing batches concurrently, reading a counter's current value, incrementing it in memory, and writing it back would lose updates whenever two batches overlap. DynamoDB's atomic ADD update expression increments in place at the database layer, so concurrent batches never clobber each other.

Rollups in DynamoDB, not raw events

The dashboard only ever needs "how many, of what kind, right now" — not a full history of every individual event. Storing pre-aggregated counters instead of one row per event keeps the read path a handful of cheap point reads instead of a query that gets more expensive as the stream grows.

The demo simulates the stream, not the whole pipeline

An earlier idea was to fake a Lambda invocation client-side too. That would have added complexity without adding anything true — the real interesting behavior for a visitor to see is "a chart updating as events arrive," and a browser-side interval reproduces exactly that, honestly, without pretending to run infrastructure that isn't there.

Next Iteration

What I'd Change Next

The gaps I know about: what I'd add before trusting this with real traffic or real data.

Alarm on iterator age

The metric that says a Kinesis consumer is falling behind is iterator age. I'd alarm on it so a stuck aggregator is noticed before the dashboard goes stale.

Enhanced fan-out if consumers multiply

One consumer is fine on shared throughput. If an anomaly detector and an archiver joined it, I'd give each its own dedicated throughput with enhanced fan-out.

Architecture Diagram

Full Architecture Diagram

The complete AWS architecture diagram for this project, built with draw.io. Click it to expand full screen.