The question arrives in nearly identical words from every stalled modernization program: do we migrate the database first, or build the lakehouse first? It is a false constraint, and it comes from treating both as single projects with one finish line each.
Here is the direct answer. Replicate continuously from the legacy relational source into a governed Apache Iceberg layer in object storage, and the sequencing problem dissolves. AWS Database Migration Service supports continuous data replication so source and target run in parallel during validation [2], which means engine cutover becomes a rehearsed traffic shift rather than one irreversible weekend. The Iceberg table specification gives that analytics layer table metadata, snapshots, and schema and partition evolution with ACID-style commits over object storage readable by multiple engines [4]. Application cutover risk and platform build stop blocking each other.
The symptom pattern is always the same before this change. The warehouse extract queue grows longer every quarter, the AI team asks for its own copy because the extract is nightly and they need yesterday's orders, and within two releases nobody can state which copy is authoritative. Permissions differ between the warehouse, the lake, and the vector index, so the first governance question about a generated answer takes a week to answer.
The Sequencing Question Behind Every Stalled Modernization Program
The programs that stall share a structural mistake: they make the analytics platform a downstream consumer of the engine migration's completion date. Every quarter the cutover slips, the data roadmap slips with it. Meanwhile the business keeps shipping reports and retrieval prototypes against the legacy source, which means the extract sprawl you were trying to eliminate grows during the exact period you promised to reduce it.
AWS prescriptive guidance for relational database migration frames the choice as a portfolio decision made per application, selected by coupling and tolerance for change, rather than one recommended path with staged cutover as the exception [1]. Read that carefully, because it changes the unit of work. If the pattern is chosen per application, then the program has many independent finish lines, not one. And if the target is validated while the source still serves traffic [2], the risky step is validation, which can be rehearsed on a Tuesday afternoon instead of gambled on at 2 a.m.
The Iceberg layer belongs on the critical path from week one, not after cutover. Fed by the same change data capture stream that feeds the target engine, it becomes the authoritative layer for analytics, reporting, and retrieval while the engine work proceeds behind it. When the engine finally cuts over, the replication source changes and the consumption contract does not.
What follows is the sequence we use on database modernization engagements: the assessment pass that produces a real scope number, the classification matrix that assigns a pattern per application, what the Iceberg specification actually buys an operator, the permission model that spans analytics and retrieval, the consumption interface rule, and the validation gates that let you shift traffic with a known abort path.
The Assessment Pass That Produces a Real Scope Estimate
Inventory four dimensions per database, not per server. One physical instance routinely hosts applications with wildly different tolerance for change, and server-level inventories hide that immediately. The four dimensions are schema objects, stored procedure and proprietary feature usage, workload profile (read/write mix, peak concurrency, transaction shape), and the complete downstream consumer list including reports, ETL jobs, and file extracts.
Run automated schema assessment first, then treat the manual-conversion backlog as the actual scope estimate [1]. This is where optimistic plans die. An assessment that reports a high automated conversion rate is reporting the easy part. The objects it flags for manual work are typically the ones encoding two decades of undocumented business rules, and they drive your timeline.
Decide explicitly which proprietary logic moves to the application tier and which stays in the database, and record that decision per object with a named owner [1]. Undocumented decisions get relitigated mid-migration by whoever is on call, and the relitigating costs more than the original analysis.
| Asset Class | What to Capture | Signal That Raises Risk | Where It Lands |
|---|---|---|---|
| Schema objects | Tables, views, constraints, types, nullability | Vendor-specific types or collations with no direct target equivalent | Target engine, mirrored into the Iceberg layer |
| Procedural logic | Stored procedures, triggers, functions, jobs | Business rules found only here, no tests, no owner | Explicit per-object decision: application tier or target engine |
| Workload profile | Read/write mix, peak concurrency, transaction shape | Long transactions or heavy write bursts at peak | Performance gate criteria for the cutover window |
| Downstream consumers | Reports, ETL jobs, extracts, service accounts, file drops | Any extract with no registered owner | Curated Iceberg table or scheduled decommission |
| Compatibility gaps | Features the target or compatibility layer does not cover | Uncovered feature on a critical path | Recorded as known scope before any commitment |
The consumer inventory is the step teams skip, and it is the one that determines whether the governed layer ever becomes authoritative. Every undocumented extract is a future permission gap. More specifically, every undocumented extract is a future unsanctioned retrieval index source, because the fastest path for an AI team under deadline pressure is the CSV that already lands in a shared bucket.
Rehost, Replatform, Refactor: The Classification Matrix
Coupling and tolerance for change drive the pattern, not database size [1]. A 400 GB database behind a well-tested service with a clean data access layer is an easier move than a 40 GB database with 600 stored procedures called directly from a desktop client nobody has built in six years.
Compatibility layers deserve specific attention because they decouple engine timing from application timing. Babelfish for Aurora PostgreSQL provides a translation layer that understands the SQL Server wire protocol and T-SQL dialect, so applications written for SQL Server can connect to Aurora PostgreSQL with limited code change [3]. The operating discipline is to test against your actual application and record every uncovered feature as known scope, because the uncovered list is the part that becomes a sprint later.
| Pattern | Coupling Signal | Cutover Mechanism | Licensing Exposure | Best For |
|---|---|---|---|---|
| Rehost | Application untouchable, vendor-supported only | Lift instance, repoint connection string | Unchanged | Short-horizon apps awaiting retirement |
| Replatform to open source engine | Clean data access layer, dialect-portable SQL | DMS continuous replication, staged traffic shift [2] | Eliminated for that workload | Services with tests and an owning team |
| Replatform behind compatibility layer | Rewrite is the blocker, dialect is pervasive | Babelfish accepts existing protocol and dialect [3] | Eliminated, minus uncovered features | Large apps where engine must move ahead of code |
| Refactor application tier | Procedural logic encodes business rules worth owning | Logic moves to services, then engine migrates | Eliminated, highest effort | Systems with active roadmap investment |
| Retire and source from Iceberg | Consumer is read-only reporting or extracts | Consumer repointed to curated table [4] | Eliminated entirely | Reports, BI, feature and retrieval pipelines |
That last row is the one most programs miss. A meaningful share of legacy database consumers are read-only. They do not need the migrated engine at all. They need a curated Iceberg table with a contract, and once they have it, they disappear from your engine migration backlog permanently.
Classification output feeds two backlogs that run in parallel: the engine migration backlog ordered by coupling and risk, and the Iceberg curation backlog ordered by how many consumers each table retires. Run both from the same board, because a curated table shipped early removes work from the other list.
What the Iceberg Table Spec Actually Buys You
Translate the specification into operator value. Iceberg defines table metadata, snapshot-based commits, and schema and partition evolution, which together give ACID-style writes and time travel over files in object storage that multiple engines can read [4]. In practice that means a schema change does not require a table rebuild and coordinated consumer downtime, and a partition strategy change does not invalidate historical data.
The one-copy consequence is the real prize. Instead of an extract per consumer, analytics, applications, and AI retrieval read the same registered tables, and every other copy including vector indexes becomes a derived artifact with recorded lineage. Retrieval-augmented generation conditions generation on documents fetched from an indexed corpus [5] (the 2020 paper remains the canonical description of the pattern), so the question of what the index was built from is not an implementation detail. It is the provenance claim.
Snapshot semantics are what make that claim auditable. Because Iceberg commits produce snapshots and support time travel [4], an evaluation or audit can re-run against the exact table state that produced an answer in March. With ad-hoc extracts, that state is gone, and the honest answer to a regulator or an internal reviewer is that you cannot reconstruct it.
- Schema evolution without rewrite
- Iceberg metadata handles column and partition changes, so a contract change does not force a table rebuild
- [4]
- Snapshot-pinned reproducibility
- Time travel lets an audit re-run against the exact table state that produced a given answer
- [4]
- Source and target in parallel
- DMS continuous replication keeps the legacy database serving while the target is validated
- [2]
- Pattern assigned per application
- AWS prescriptive guidance treats engine choice as a portfolio decision selected by coupling, not one project
- [1]
- Maintenance burden offloaded
- Amazon S3 Tables provides managed table storage for Iceberg with ongoing maintenance such as compaction
- [6]
The operational objection is legitimate and worth answering directly: self-managed Iceberg means owning compaction, snapshot expiry, and metadata upkeep, and teams that got tired of that work drifted back toward proprietary copies. Amazon S3 Tables offers purpose-built storage for Iceberg tables with managed maintenance operations including compaction [6], which removes most of the reason to retreat.
One Permission Model Across Analytics, Applications, and Retrieval
The failure mode comes first because it is the one that kills retrieval projects. When the warehouse, the lake, and the vector index each carry their own access model, nobody can answer "is this user allowed to see this answer" without a multi-team investigation. The project does not fail a technical review. It fails a governance review, which is slower and more expensive.
Make the Iceberg catalog the enforcement surface. AWS Lake Formation table, column, and tag-based grants let a new consumer inherit permissions on registered tables instead of receiving a copy. That inversion matters: in a copy-based world, access is granted by handing over data, so revocation is a fiction. In a grant-based world, revocation is a catalog change that takes effect on the next query.
Carry document-level access labels into any derived retrieval index and filter at query time by the requesting user's entitlements. Post-filtering generated text is not access control, because the model has already read the restricted content and may have paraphrased it into the answer. Filter the candidate set, then generate.
Keep content and topic policy in a separate enforcement layer in front of the model. Amazon Bedrock Guardrails applies configurable safeguards to model inputs and outputs independent of the application prompt [7], which means your restrictions survive a prompt refactor and a model swap. Version those policies in the same repository as your application code so a change has a reviewer and a diff.
Require source attribution on every generated answer, and log the retrieved record identifiers alongside the response. Retrieval grounds generation in specific fetched passages [5], so the identifiers exist. Logging them is the difference between a claim you can trace to a row and a claim you can only defend with adjectives.
Curated Tables as the Only Sanctioned Consumption Interface
State the rule plainly and publish it: curated, contract-tested Iceberg tables are the only sanctioned consumption interface, and every ad-hoc extract has a decommission date on a published schedule. Tolerated indefinitely, extracts multiply. Given a date and a replacement table, they end.
A data contract is not a wiki page. It is schema with types and nullability, partition strategy, freshness expectation, named owner, breaking-change policy, and a test suite that runs on every publish. We cover the failure modes when contracts are missing in more detail in data contracts for AI, and the short version is that silent schema drift reaches the model before it reaches a human.
# Contract-tested publish: assertions run before the snapshot is committed
import pyspark.sql.functions as F
df = spark.table("staging.orders_cdc_merged")
assert df.filter(F.col("order_id").isNull()).count() == 0, "order_id nullability contract"
assert df.select("order_id").distinct().count() == df.count(), "order_id uniqueness contract"
assert set(df.columns) >= REQUIRED_COLUMNS, "removed column requires a breaking-change review"
max_lag_minutes = df.agg(F.max("source_commit_lag_minutes")).collect()[0][0]
assert max_lag_minutes <= 15, f"freshness contract breached: {max_lag_minutes}m"
(df.writeTo("curated.orders")
.using("iceberg")
.partitionedBy(F.days("order_ts"))
.createOrReplace()) # commit produces a snapshot consumers can pin# Anti-pattern: retrieval ingestion from an unregistered nightly extract.
# No catalog registration, no access labels, no snapshot to pin an audit to.
loader = CSVLoader("s3://analytics-scratch/exports/orders_nightly.csv")
index.ingest(loader.load()) # lineage ends here; entitlements are goneCurated tables are also what make downstream decision workflows reviewable rather than anecdotal. When the same contract-tested tables feed BI, feature pipelines, and agent retrieval, a disagreement between a dashboard and an agent answer becomes a debuggable lineage question. That consistency is the foundation our enterprise data and analytics work is built on.
Validation Gates and the Rollback Path You Rehearse
The mechanism that makes staged cutover possible is continuous replication. DMS supports ongoing replication so the source database keeps serving production traffic while the target is loaded and validated in parallel [2]. That converts cutover from an event into a routing decision you can make, observe, and reverse.
Order the gates and require all of them to pass before any traffic moves [1][2]. Row counts first because they are cheap and catch replication gaps. Then checksums or hash comparisons on the columns that matter. Then query-level parity against real business queries, not synthetic ones, because the queries that break are the ones with vendor-specific date handling and implicit casts. Then performance comparison under replayed peak workload.
| Gate | What It Proves | Pass Criterion Owner Must Set | Abort Action |
|---|---|---|---|
| Row counts | Replication delivered every row | Zero variance on bounded tables, declared tolerance on high-churn tables | Hold cutover, re-sync affected tables |
| Checksums | Values match, not just counts | Hash equality on all contract columns | Hold, investigate type and collation mapping |
| Query parity | Real business queries return identical results | Named query set, exact-match or declared tolerance per query | Hold, assign the failing query to engine or app backlog |
| Latency under replay | Target holds at observed peak concurrency | p95 and p99 at or below source baseline for the peak window | Hold, resize or tune before re-running |
| Reverse replication rehearsal | Rollback is a routing change, not a restore | Rehearsed rollback completes inside the declared window | Do not open the cutover window |
Shift read traffic before write traffic, keep reverse replication configured and tested, and write quantitative abort criteria before the window opens [1]. Criteria invented during an incident are negotiated under pressure, and the negotiation always favors pressing forward. Numbers agreed a week early do not.
The parallel-track payoff shows up here. Because the Iceberg layer is fed by the same replication stream, analytics and AI consumers are unaffected by the engine cutover window. Nobody has to pause a dashboard or freeze an index. This is also the sequencing logic behind our database modernization factory approach, where the same assessment and gate stack runs across a portfolio instead of one application at a time.
Frequently Asked Questions
Can we build the Iceberg layer before picking engine targets?
Yes, and you should. The layer is fed by change data capture from the current source, so it does not depend on any target decision. When the engine migrates, the replication source changes and consumer contracts do not.
Does Iceberg replace the warehouse?
It replaces the copy sprawl. Iceberg tables in object storage become the authoritative layer with snapshots and schema evolution readable by multiple engines [4]; your query engine remains a choice, not a storage commitment.
What if stored procedures block replatforming?
Evaluate a compatibility layer. Babelfish accepts the SQL Server wire protocol and T-SQL dialect so the engine can move ahead of application code [3]. Record every uncovered feature as committed scope on day one.
Who owns curated table contracts?
A named person per table, listed in the contract. Shared ownership means the freshness assertion fails at 3 a.m. and three teams each assume the other is paging.
How do we stop teams from building their own extracts?
Publish decommission dates, ship the replacement table first, and require that retrieval index sources be catalog-registered. Make the sanctioned path faster than the shortcut.
How do we sequence a database migration and a lakehouse build at the same time?
Treat them as two streams fed by one replication path rather than two projects with one finish line each. AWS prescriptive guidance frames the migration pattern as a per-application portfolio decision [1], and AWS Database Migration Service supports continuous replication so source and target run in parallel during validation [2]. Our database modernization practice sequences the engine work and the governed Iceberg layer against the same change data capture stream.
Your Next Working Session
Your next working session: produce the consumer inventory for your single highest-traffic legacy database and mark every extract as sanctioned, replaceable by a curated table, or retire. One metric to start tracking this week is the count of unsanctioned extracts and derived copies reading the legacy source, trended weekly toward zero.
The sequencing question dissolves once replication, not cutover, is the thing that feeds your platform. Pick the database, build the inventory, and the false choice stops being a planning constraint. If you want the gate stack and contract templates applied to your portfolio, that work sits inside our enterprise platform engagements.
References
[1]Amazon Web Services, "AWS Prescriptive Guidance: Migration strategy for relational databases," 2026. https://docs.aws.amazon.com/prescriptive-guidance/latest/strategy-database-migration/welcome.html
[2]Amazon Web Services, "AWS Database Migration Service User Guide," 2026. https://docs.aws.amazon.com/dms/latest/userguide/Welcome.html
[3]Amazon Web Services, "Babelfish for Aurora PostgreSQL, Amazon Aurora User Guide," 2026. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.AuroraPostgreSQL.Babelfish.html
[4]Apache Software Foundation, "Apache Iceberg Table Specification," 2026. https://iceberg.apache.org/spec/
[5]Lewis et al., "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks," 2020. https://arxiv.org/abs/2005.11401
[6]Amazon Web Services, "Amazon S3 Tables, Amazon S3 User Guide," 2026. https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables.html
[7]Amazon Web Services, "Amazon Bedrock Guardrails, Amazon Bedrock User Guide," 2026. https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html