From Operational to Analytical, Part 3: Deleting the Half I Didn't Need
Redshift Serverless billed $72/day even at one event per second — the continuous CDC write drip defeated scale-to-zero. The fix was subtractive: delete the hot tier, read Iceberg directly, let Redshift sleep. Measured over 19 days.
A personal note before this one. I joined the Amazon Redshift team not long ago, and I've been learning the product the way I learn anything - by building on it and writing down what surprises me. Onboarding, relocation and an injury in the family has taken most of my time, so these posts have slowed and this one is later than I'd planned. Nobody asked me to keep writing them and nobody has told me to stop, so I'll keep going and see how it evolves.
What brought me back to it was a mistake in my own setup. While I was still experimenting with the Part 2 pipeline, I noticed the Redshift Serverless workgroup never scaled to zero, even when I'd stepped away from it for a day. The reason was mine: an automated SageMaker query I'd scheduled to run every minute was quietly holding the workgroup awake. Chasing that down is what surfaced the larger cost story below - and it sent me back to the patterns AWS has published for continuously-fed analytics, streaming into Apache Iceberg on S3 and querying it from engines like Redshift and Athena on top ( Apache Iceberg write support in Amazon Redshift ). I pivoted the design around what I found. Here's the revised Part 3, picking up from where Part 2b left off.
One correction I owe from the earlier posts while I'm here. In Parts 2a and 2b I described querying the cold Iceberg tables "on Spectrum." That's the wrong name for this setup: Redshift Spectrum is the dedicated external-server fleet that provisioned (DC2/RA3) clusters use, but everything in this series runs on Redshift Serverless, which reads external S3 and Iceberg tables with an integrated data lake query engine on the workgroup's own compute. The SQL surface is identical - external schemas, external tables, the same IAM role - which is exactly why I reached for the familiar word without checking. Learning that distinction properly is one of the things joining the team fixed for me; I'll use the accurate term from here on.
Part 2a built a hot tier and a cold tier - a continuously-fed Redshift table for the live queries, an Apache Iceberg archive on S3 for the deep history - and a unified view layer that let one set of SQL span both. Part 2b automated the chore that split creates: a scheduled, safety-gated prune of the hot tier once the cold archive has the rows. Two posts of architecture, and it worked.
This post takes half of it back.
The thing that started it was a number on the bill. I had claimed in Part 2a that "at one event per second the pipeline is mostly idle," and promised to publish the measured cost once it stabilized. It stabilized, and it contradicted me. So I went looking for why, and the why turned out to indict the architecture, not the config. The hot/cold split I spent two posts building is, for this workload, a tier of infrastructure I can delete - and the version that's left is cheaper, simpler, and serves every use case Part 2a walked through. This is the post where I measure that claim instead of asserting it.
The floor I didn't expect
Two of the services in this stack tell opposite stories about what "serverless" costs when nothing is happening.
Aurora DSQL bills like the textbook promise. Zero on idle days; about fifteen cents a day once the simulator runs continuously. Distributed processing units consumed as work arrives, no floor under the silence. The database tier matches the cost shape of everything else around it - that's the property that made DSQL the right operational store for this in the first place.
Redshift Serverless does not behave that way at all. The workgroup sits pinned at its base capacity of 8 RPUs around the clock, and Redshift Serverless bills per RPU-hour for every second the workgroup is awake. At the us-east-1 rate of $0.375/RPU-hour, 8 RPUs × 24 hours is about $72 a day - roughly $2,150 a month - whether I query it or not. (Rate is us-east-1 at the time of writing; check current pricing for your region, but the shape of the argument holds regardless of the exact number.)
I had assumed "serverless" meant Redshift idles to nothing between queries - that was my read, and the docs are clear if you go look. Redshift Serverless does auto-suspend: a workgroup that goes fully idle for a few minutes pauses and stops billing. The catch is the word "fully," and that's the part I hadn't thought through. I pulled the query arrival from sys_query_history - roughly 25,900 queries in three hours, an average gap of well under a second between them. The longest quiet stretch wandered from a few seconds to about a minute depending on when I looked - never the several minutes of continuous silence the suspend timer needs, and never gets, so the workgroup is awake 100% of the time and I pay for all 8 RPUs every one of those seconds. That's a billing fact, flat regardless of load. The utilization underneath it is a separate, sadder number: cross-referencing the query timings against the charged compute, only about 29% of that always-on capacity was doing real work. The other 71% is base capacity I'm billed for while the workgroup sits warm between a relentless trickle of tiny queries.
The trickle is the pipeline feeding itself. The CDC Lambda writes each Kinesis batch into Redshift through the Data API - on the order of 2,400 inserts an hour. That steady write drip is what keeps the workgroup awake. The thing I built to keep the hot tier fresh is the thing preventing the hot tier from ever scaling to zero. It is not a misconfiguration I can tune away with a parameter; it's a property of the workload. A continuously-fed micro-batch write pattern is exactly the shape that defeats scale-to-zero, and I'd built one without noticing it would.
Push back on this if you've run Redshift Serverless under a steady write feed and seen it suspend anyway - I want to know what was different about your workload. But the number was stable across a week, and the mechanism underneath it is simple enough that I went looking for the obvious move: make the writes stop pointing at Redshift.
What the cold tier was already doing
Here's the thing I'd half-forgotten while staring at the hot tier: the cold archive isn't a downsampled, delayed copy. It's everything.
The Firehose-to-Iceberg leg from Part 2a tees the same Kinesis stream the hot Lambda reads. It receives every CDC event as it arrives - newest included, not aged-out rows. "Cold" was a name I picked for the cheap-to-read history tier; it was never a statement about freshness or completeness. I checked it live and measured both paths against the wall clock: the newest row in the hot Redshift table was 7 seconds behind real time, the newest row in Iceberg 59 seconds. That ~50-second gap is the only difference between the tiers, and it's not decay - it's buffering. The hot path flushes on the Lambda event-source-mapping's 5-second batch window; the cold path holds records until Firehose's 60-second buffer trips (it never hits the 64 MB size trigger at this event rate, so 60 seconds always wins). So the delta is a fixed, configured ~50 seconds, not a drift that widens - Iceberg holds the same data, roughly a minute behind, and it never falls further back than the buffer interval. If you needed the cold path fresher you'd shrink that Firehose interval and pay it in smaller files; that's the knob. Iceberg has all of it, current to within a minute.
That reframes the whole question. If Iceberg already has every event, the hot Redshift table isn't a source of anything - it's a fast cache of state that's also sitting in Iceberg. The unified views (the Part 2a SQL layer that UNIONs the hot and cold tiers so one query spans both), the prune job, the second write path: all of it exists to keep that cache in sync. Delete the cache and you delete the machinery that maintains it. The only question left is whether you can answer the actual queries directly off Iceberg, fast enough. That's measurable, so I measured it.
Reconstructing current state without a hot table
Every "current state" query in this series uses the same trick: the event log is append-only, so to get the latest state of each record you dedupe by key and keep the newest commit. In SQL that's a ROW_NUMBER window partitioned by record, ordered by commit time descending, filtered to row 1.
-- current order state, straight off the Iceberg archiveSELECT order_id, ed."status"::VARCHAR AS status, ed."total_cents"::BIGINT AS total_cents, last_change_atFROM ( SELECT record_id AS order_id, JSON_PARSE(event_data) AS ed, -- cold event_data is a JSON string; recover SUPER commit_timestamp AS last_change_at, operation, ROW_NUMBER() OVER (PARTITION BY record_id ORDER BY commit_timestamp DESC) AS rn FROM cold.cdc_events_archive WHERE source_table = 'orders')WHERE rn = 1 -- newest event per order wins AND operation <> 'd'; -- a delete as the latest event tombstones the rowOne wrinkle worth flagging, because it cost me time the first run: Redshift won't let you reach into a freshly-parsed JSON value inline - parse the cold event_data string into a SUPER value and try to dot-navigate to a field in the same expression and you get a syntax error. You alias the parsed value to a named SUPER column in a subquery first, then navigate it in the layer above. That's why the dedupe and the field extraction are split across two levels in the query above rather than collapsed into one.
The hot table made this fast by keeping itself small - the prune held it to tens of thousands of rows. Run the same reconstruction over the full Iceberg archive and the worry is the window-sort: ranking every event by key over an append log that grows without bound costs on the order of n-log-n, and if that cost climbs faster than the data does, dedup-on-read eventually needs a materialized current-state table to lean on - which is most of the hot tier coming back through the side door.
So I ran it against growing slices of the live archive and timed the server-side execution:
input rows | exec time | per-row cost |
|---|---|---|
100,000 | 1.04 s | 10.4 µs |
250,000 | 1.14 s | 4.6 µs |
500,000 | 1.72 s | 3.4 µs |
745,214 | ~2.1 s | 2.7 µs |
Over this range the wall-clock barely moves: seven and a half times the data, about twice the time, and the per-row cost falls as the table grows. The honest reading of that is not "the sort is sub-linear" - it isn't, a window-sort is n-log-n and stays that way - it's that at these row counts the fixed overhead (query planning, S3 round-trips, file listing) dominates the sort, so adding rows mostly amortizes the fixed cost instead of growing the sort. The window-sort, the thing I expected to sink this, isn't the bottleneck yet. At ~750,000 keys the full reconstruction answers in about two seconds, with no hot table and no periodic materialization.
745,000 rows is a small table - this is a simulator, not a year of a real retailer's orders. The result I'm claiming is narrow: at this scale, dedup-on-read is fast enough and the sort cost is still hiding behind fixed overhead. What I have not shown is where the curve bends, because I haven't run it there.
Past five or ten million keys, once the fixed overhead stops hiding the sort, I'd expect the curve to bend and I'd re-measure. If it crosses the latency budget there, the fix is a scheduled job that materializes current-state into a small table every few minutes - the same scheduled-job shape Part 2b built for the prune, pointed at a different target. But that's an optional optimization you reach for when measurement tells you to, not a tier you build up front. For this workload, at this scale, querying Iceberg directly is enough.
Is two seconds too slow? Part 2a already answered that
The reflex objection is that a two-second Iceberg scan is slower than a hot table that answers in hundredths of a second. It is. The question is whether that matters, and Part 2a answered it before I knew I'd need the answer.
Of the six use cases that post walked through, I re-ran every one as an Iceberg-only query against the live archive:
Use case | Part 2a latency need | Iceberg-only |
|---|---|---|
Operational dashboard (last hour) | single-digit seconds | 1.7 s |
Historical trend (revenue by day) | not latency-sensitive | 0.7 s |
Audit / replay (one key's history) | not latency-sensitive | 1.3 s |
Offline ML features (180 days) | not latency-sensitive | 1.7 s |
Reconciliation (past-day counts) | not latency-sensitive | 0.5 s |
Real-time alerting (>$500 in 5 min) | sub-second, continuous | see below |
Five of the six state a budget of "single-digit seconds" or have no real-time requirement at all, and every one of them lands comfortably inside it straight off Iceberg. The sixth - real-time alerting - is the one Part 2a already flagged as wanting the hot tier, and it's the one honest exception here too. A point query for it clocks 0.24 seconds, but that misses the point: alerting isn't a query workload. It needs sub-second response on every event, continuously, and Iceberg's variance (that same dashboard query ranged from 0.36 to 4.2 seconds across passes, on S3 tail latency and small-file fan-out) makes it the wrong substrate for a streaming trigger. The answer isn't to query Iceberg faster. It's that alerting was never a job for the analytical store - it's a thin Kinesis-to-Lambda trigger hanging off the same stream that feeds Iceberg, firing on the event as it passes, touching neither tier.
The two I'm least sure generalize to a non-e-commerce reader are cohorts and offline ML features - if your cohort logic is heavier than a windowed aggregate, tell me where the two-second number breaks for you.
The architecture that's left
Put the cost finding and the latency findings together and the change is subtractive, not a redesign:
DSQL -> Kinesis -> Firehose -> Iceberg on S3 (the one landing zone) | +--------------+--------------+ v v Kinesis -> Lambda alerting trigger Redshift Serverless, on demand (sub-second, off the same stream) (reads Iceberg -> idles -> suspends -> $0)Keep the Firehose-to-Iceberg leg exactly as it is. Delete the hot Redshift Lambda, the *_current and *_unified UNION views, and the Part 2b prune job. Iceberg becomes the sole source of truth; Redshift becomes an on-demand query engine that reads it and sleeps between queries. There's no hot table to keep in sync, no hot-plus-cold union to predicate-prune, no scheduled prune to babysit, no two-catalog Lake Formation dance. The append-only-plus-dedupe-on-read pattern absorbs updates and deletes the same way the views already did - DSQL's CDC preview emits inserts and deletes as the same append, and ROW_NUMBER sorts it out at read time.
The claim that the floor goes away is the one I owed a measurement, because Part 2a's mistake was asserting a cost I hadn't watched. So I ran it: I stopped the CDC write path and the one scheduled dashboard reader that was polling the workgroup every minute, and watched the CloudWatch compute metric.
time | Redshift compute |
|---|---|
T-0 to T+7 min | 8.0 RPU (pinned, as it had been for days) |
T+7 min | 0.0 RPU - suspended |
T+7 onward | 0.0 RPU, held |
Remove the continuous traffic and the workgroup suspends to zero in about seven minutes and stays there - it held at 0.0 RPU for the rest of my observation window, not just a single reading. The floor isn't structural; it was held up entirely by the write drip and a per-minute dashboard poll.
That first test disabled traffic on the existing workgroup, which proves the mechanism but is still a bit of a lab trick - I turned the inputs off rather than building the thing. So I built the thing: a second Redshift Serverless workgroup, pointed at the same Iceberg archive, with no writer and no scheduled reader attached - the deleted-hot-tier shape, standing next to the original instead of replacing it. Both read the identical table, so it's a clean A/B. Over more than two weeks side by side, the original dual-write workgroup sat pinned at 8 RPU around the clock, while the Iceberg-first one held 0 - emitting compute only in the seconds it was actually answering a query, then dropping back. Same data, same engine; the only difference is that one of them is fed continuously and the other isn't. That's the cost claim, measured on the architecture itself rather than on a disabled copy of the old one.
That second one is the nuance I most want to be exact about, because it's the whole architecture in miniature: I had to quiet the reader too, not just the writer. A dashboard polling Redshift every minute re-pins the full 8-RPU floor even with zero writes - so if I'd left the Part 2a dashboards pointed at Redshift, the workgroup would never have slept no matter what I did to the write path. That sounds like it undercuts the result; it's actually the design. In the Iceberg-first shape the dashboards don't query Redshift at all - they read Iceberg, which the use-case table above showed they can, at one-to-two seconds. Both the writes (now Firehose's job) and the routine reads (now Iceberg's) come off Redshift, and that is why it's free to sleep.
What's left pointed at Redshift is occasional, deliberate query work - an analyst opening a notebook, a heavier cohort job - and that's where the honest caveat lives: a suspended workgroup isn't free on the next query, it's cheap. Each wake bills a 60-second minimum and a few seconds of cold-start resume, so the economics are "pay per burst, pay nothing between bursts," not "pay nothing." The win is real precisely because the analytical workload here is bursty - nobody is watching these dashboards every minute except the simulator I just turned off. Worth noting that the cold-query side of that wake penalty keeps shrinking, too: AWS recently moved query compilation off the critical path , so a first query after idle no longer pays the old compile cost - the gap between "asleep" and "answering" is narrower than it used to be.
The number I owed, and where this goes
I've measured every piece of this against the live deployment - the suspend, the dedup scaling, the six use cases, the Iceberg health under a continuous feed (at 47 days of continuous ingest, Firehose lands ~1,400 new files a day and S3 Tables compaction merges ~5,500 a day behind it, so the object count grows slower than the commit rate; snapshot expiration holds the window; the one thing to watch is metadata-file growth at high commit rates, tunable with the Firehose buffer). And the billing number I owed has now landed. I let the Iceberg-first workgroup soak for over two weeks next to the original and pulled the actual Cost Explorer line for Redshift Serverless compute: it billed a flat 191.5 RPU-hours a day - $71.80 - every single day, and that was the same $71.80 before the second workgroup existed as after two weeks of it running. The Iceberg-first workgroup added zero to the bill.
CloudWatch shows why from the other side. Over those two weeks the dual-write workgroup reported 8 RPU on every hourly sample without a single dip, while the Iceberg-first one reported compute on only nine samples in over two weeks - all but one at zero, and that single non-zero blip was a deliberate probe query I ran. A suspended Serverless workgroup emits no compute datapoint at all, so "no datapoint" is the reading: it was asleep for essentially the entire window, waking only for the few deliberate queries I ran and dropping straight back. That's the number Part 2a should have carried: the ~$72/day, ~$2,150/month Redshift compute floor goes to $0 at idle once the continuous writer and per-minute poller stop pinning it. Not "the workgroup suspends" - the bill line itself, flat at zero for the workgroup that sleeps.
One honest bound on that figure: it's the Redshift Serverless compute line specifically, measured on a workgroup reading the same Iceberg archive. It isn't the whole-pipeline bill - you still pay Firehose, S3, and the DSQL-to-Kinesis path either way. But that compute floor was the single largest line, and the one the hot tier existed to feed, and it's the line that drops to zero. What I still haven't done is watch a full calendar month land under real analyst traffic rather than a simulator I control, or push the dedup reconstruction past the five-to-ten-million-key range where I expect the sort to start showing. Those are the next two things to report.
The arc of this series turned out to be the one I didn't plan: build the obvious architecture, measure it, and let the measurement tell you which half you didn't need. Part 2a built hot and cold. Part 2b automated the seam between them. Part 3 found that the seam was the cost, and the cold tier alone was already the whole story. If you've run a CDC pipeline into Redshift Serverless and watched your own bill - especially if you found a way to keep the hot tier and still let the workgroup sleep - I'd like to know, in the comments or the repo issues .
A note on how this got measured, because it's half the point. Four MCP servers and four Claude Code skills did the heavy lifting — each one mattered for a specific reason, not as a convenience:
- The suspend measurement used the CloudWatch MCP server to read ComputeCapacity externally. Any query against the workgroup itself — including through the Redshift MCP server — resets the idle timer I was trying to watch elapse, so CloudWatch wasn't a convenience, it was the only correct instrument.
- The $71.80/day billing number came from the billing-cost-management MCP server calling Cost Explorer programmatically — the same getCostAndUsage call, run daily for over two weeks, that proved the Iceberg-first workgroup added zero to the bill.
- The latency probes and the use-case queries ran through the Redshift MCP server for native tables, falling back to the Redshift Data API (via the AWS API MCP ) for the external Iceberg schema — because the Redshift MCP's read-only transaction can't incorporate an external catalog on first touch.
- The DSQL side — verifying the CDC source is still flowing, linting schema changes — used the Aurora DSQL MCP server .
The patterns those servers executed against are encoded in four reusable skills: dsql-to-analytics-pipeline and cdc-streaming-pipeline carry the append-log-plus-ROW_NUMBER reconstruction and the use-case queries; firehose-iceberg-pipeline encodes the small-file/compaction/snapshot-expiry gotchas; lakehouse-redshift handles the external-schema catalog paths and Lake Formation grants. The skills live at jaingxyz/aws-data-skills and the companion code — including the SQL behind every table above — at jaingxyz/dsql-redshift-cdc-pipeline . Load the skills into Claude Code or any skill-aware agent and it will stand the architecture up against your own DSQL cluster and your own schema, including the writes-only-to-Iceberg shape. The MCP servers are all open-source in the awslabs/mcp monorepo — install with claude mcp add or drop them into your .claude.json.
Disclaimer: I've worked on Aurora DSQL, now on Amazon Redshift, and at AWS more broadly. The writing and opinions here are my own and don't necessarily reflect those of my employer.##
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article