Apache Iceberg Atomic Transactions on Amazon S3: Rebuilding the Source of Truth for the Cloud-Native Trading Desk - Part 1
Apache Iceberg Atomic Transactions on Amazon S3: Rebuilding the Source of Truth for the Cloud-Native Trading Desk - Part 1
Series: Financial Service (33 articles)
- …
- 28Apache Iceberg Atomic Transactions on Amazon S3: Rebuilding the Source of Truth for the Cloud-Native Trading Desk - Part 1 This article
The most important systems in a financial institution are not necessarily the systems with the most visible interfaces. They are the systems that preserve the difference between what happened, what the institution believed had happened, and what the institution later proved had happened. A trading desk can tolerate a slow dashboard for a short period. It cannot safely tolerate a position assembled from a partially committed dataset, a surveillance model trained on an inconsistent snapshot, or a regulatory reconstruction whose files changed while the evidence was being read.
This is why the migration of trading data to object storage is not primarily a storage project. It is a transaction-semantics project.
Amazon Simple Storage Service is extraordinarily durable, scalable, and operationally simple as an object store. It is not a conventional relational database. It does not provide a traditional folder transaction in which an application locks a directory, changes several files, and exposes all of those changes through one database commit. The folder that users see in an S3 console is a presentation of object-key prefixes, not a transactional container. A writer can create data objects one after another, but a reader that discovers files by listing a prefix can observe an incomplete business change if it reads between those writes. A job that overwrites a partition by deleting old objects and adding new ones can expose absence, duplication, or mixed generations. A concurrent writer can make a separately maintained file inventory stale. The objects may each be intact while the table is logically wrong.
Apache Iceberg resolves this contradiction by moving the source of truth away from a folder listing and into a versioned hierarchy of metadata. The collection of Parquet objects is no longer asked to announce its own table state. A committed metadata pointer identifies one table metadata file. That file identifies an immutable snapshot. The snapshot identifies a manifest list. The manifest list identifies manifest files. The manifests identify the exact data and delete files that belong to the snapshot and carry statistics that allow readers to avoid irrelevant files. A reader begins from one committed pointer and therefore sees one coherent state.
This is the architectural inversion that matters. The path is no longer the truth. The committed metadata graph is the truth. The data files are durable evidence addressed by the graph.
For a trading desk already operating Apache Iceberg on enterprise servers, this model is familiar. The strategic change is that AWS now offers multiple cloud-native ways to operate the catalog and storage boundary. AWS Glue Data Catalog can serve as the catalog for Iceberg tables stored in general-purpose S3 buckets. Amazon S3 Tables provides storage purpose-built for Iceberg tables, table buckets, native table resources, automatic maintenance, and standardized Iceberg REST access. The AWS Glue Iceberg REST endpoint can provide unified discovery, governance, and fine-grained access. The direct S3 Tables Iceberg REST endpoint can expose basic read and write access to a table bucket and can translate standardized Iceberg REST operations into S3 Tables operations.
The resulting opportunity is not simply to relocate an existing server. It is to preserve Iceberg’s open transaction contract while eliminating a large share of the catalog, compaction, snapshot, orphan-file, scaling, and infrastructure work that does not differentiate a trading business. The resulting obligation is equally clear. The enterprise must understand the metadata tree, optimistic concurrency control, isolation model, failure modes, retention semantics, engine compatibility, and governance path deeply enough to know what has actually become safer and what remains its responsibility.
We should raise the industry standard by refusing two easy stories. The first easy story is that object storage cannot support reliable transactions. Iceberg demonstrates that serializable table changes can be built over immutable objects when the commit point is correctly designed. The second easy story is that adding Iceberg automatically creates a trustworthy platform. It does not. Iceberg can make file changes atomic at the table level. It cannot decide whether a trade was correctly booked, whether an exchange correction was interpreted properly, whether a timestamp is trustworthy, whether access is ethically justified, or whether a team will reveal a defect before it reaches the regulator.
The higher standard joins a precise technical control plane with a candid human control plane. The technical mechanism uses Iceberg metadata, optimistic concurrency, AWS Glue, S3 Tables, IAM, Lake Formation, KMS, Athena, EMR, Glue, CloudTrail, and CloudWatch. The human mechanism combines Google’s work on psychological safety, Amazon’s Leadership Principles, Bridgewater Associates’ emphasis on extreme truth and transparency and idea meritocracy, Alfred Adler’s emphasis on belonging and contribution, nonviolent communication, and the tactical empathy associated with former FBI hostage negotiator Chris Voss. The objective is not motivational decoration. It is to reduce the distance between a defect and its disclosure, between an observation and reproducible evidence, and between disagreement and a responsible decision.
The Contradiction at the Center of the Data Lake
Trading data arrives as a stream of changes, but analytical storage is often organized as immutable files. This is economically powerful and operationally dangerous when the table abstraction is weak.
A market-data adapter writes quote events. An order-management system writes order transitions. An execution-management system records fills and allocations. Brokers deliver drop copies. Exchanges publish corrections. Clearing agents return settlement states. Risk engines produce sensitivities and valuations. Surveillance services produce alerts and features. Each pipeline may create many Parquet files. A business action may require several files because output is partitioned, parallelized, or larger than one object. A correction may add data files and remove the logical effect of earlier rows. A schema change may alter how future records are interpreted. A compaction job may replace hundreds of small files with a few larger files without changing the table’s business content.
If consumers identify the table by listing a prefix, they inherit race conditions. The reader may list before all writer tasks finish. It may observe new files while old files still exist. It may cache a listing that no longer represents the intended state. It may infer partitions from folder names and silently miss data when partition rules evolve. A cleanup process may delete a file that another job has written but not yet committed. A retry may duplicate output. Two writers may each believe that they are replacing the same old set of files.
Traditional databases solve comparable problems through a transaction manager, logging, locking or multiversion concurrency control, and a durable commit record. Iceberg does not attempt to transform S3 into a block-storage database. It uses immutability and metadata indirection. Writers create new data and metadata objects without modifying the currently committed snapshot. The visible table changes only when the catalog atomically replaces the current metadata pointer under a validation condition.
The business meaning is profound. A multi-file change becomes atomic because none of the new files are visible through a committed table snapshot until the pointer changes. Once the pointer changes, all files referenced by the new snapshot become visible together. A failed attempt can leave unreferenced files, but it does not create a partially committed table. Those unreferenced objects are an operational cleanup concern, not a reader-consistency failure.
Atomicity here is table atomicity, not a promise that every operation across every table is one distributed transaction. A desk that updates orders, executions, positions, and risk tables separately still requires orchestration and business reconciliation across those tables. Iceberg provides a strong unit of truth at the table boundary. Architecture must not inflate that boundary into a claim the format does not make.
The Three-Layer Metadata Tree
The Iceberg metadata structure is often described as three layers. That is a useful teaching model as long as each layer is stated precisely.
The first layer is the catalog and current metadata pointer. The second layer is table metadata, snapshots, and manifest lists. The third layer is manifests and the data or delete files they track. The hierarchy allows the system to commit through one pointer, preserve snapshot history, prune large regions of data before opening files, and evolve schema and partition behavior without encoding table truth in a directory layout.
The metadata tree should not be treated as incidental overhead. It is the database mechanism. The Parquet files hold rows, but the metadata tree determines which rows constitute the current committed table.
The Catalog Layer as the Atomic Gatekeeper
The catalog answers the first essential question: where is the current table metadata file for this named table.
For a Glue-backed Iceberg table, the AWS Glue Data Catalog stores the table entry and metadata location. For an S3 Tables implementation, the S3 Tables control plane and its REST catalog interfaces perform the equivalent table-coordinate and commit role. A REST client sends standardized catalog operations to an endpoint authenticated with AWS Signature Version 4. The direct S3 Tables endpoint uses a regional URI and a table-bucket ARN as the warehouse identity. AWS recommends the AWS Glue Iceberg REST endpoint for broader unified management, centralized governance, and fine-grained access, while the direct S3 Tables endpoint is suitable for basic read and write access to a single table bucket or certain partner and custom catalog arrangements.
The catalog is not merely a name registry. It is the serialization point for commits.
A writer begins from metadata version A. It reads the current snapshot, plans a change, writes new data files, writes manifests, writes a manifest list, and writes table metadata version B. It then asks the catalog to replace the current pointer from A to B, but only if A is still current. This is optimistic concurrency control. The application performs expensive work without holding a broad lock. It validates its assumption at commit time.
If another writer commits metadata version C first, the pointer no longer equals A. The compare-and-swap condition fails. The losing writer must not overwrite C. Iceberg evaluates whether the operation can be retried against the new state. An append may often be safely replanned because both writers can contribute new files. A rewrite, delete, or overwrite may conflict if the other commit changed files or data that the operation assumed were unchanged. Correctness requires validation specific to the operation, not blind retry.
This distinction is essential in financial services. Retrying a failed request is not automatically safe. A producer must know whether the transaction is idempotent, whether the source offsets remain valid, whether new concurrent data changes the predicate, and whether the operation should merge, fail, or be escalated. The platform should capture the base snapshot ID, attempted operation, validation failure, retry count, source batch identity, and final committed snapshot.
Optimistic concurrency avoids long-lived table locks and supports high parallelism when conflicts are low. It is especially effective for append-heavy event tables. Conflict rates can rise when many writers rewrite the same partitions, perform broad merges, or compact files that active jobs are modifying. The response should not be to disable validation. The response is to design writer ownership, partition locality, retry policy, and maintenance scheduling deliberately.
AWS Glue’s modern Iceberg integration supports optimistic locking through the Glue catalog. Historical deployments using AWS Glue 3.0 with Iceberg 0.13.1 required additional DynamoDB lock-manager configuration to ensure atomic transactions. Current AWS guidance prefers the Glue catalog as the lock manager for Glue-backed Iceberg workloads. This historical distinction belongs in migration plans because an enterprise server estate may still contain older Spark and Iceberg combinations whose locking assumptions differ from current services.
DynamoDB remains useful as an example of optimistic locking. A version attribute can be checked in a conditional update so that a client updates only the version it previously read. If the version changed, the update fails rather than overwriting a concurrent change. The conceptual similarity is important, but a current S3 Tables architecture should not insert a custom DynamoDB lock table when the selected catalog already supplies the required atomic commit mechanism.
The Snapshot Layer as the History of Committed Truth
The table metadata JSON file records the table’s identity and configuration. It includes the current schema, schema history, partition specifications, sort orders, properties, snapshot references, snapshot log, and the current snapshot identifier. A new metadata file is produced when a committed table-level change requires a new table state. Earlier metadata files remain immutable until retention and cleanup policy determines that they are no longer required.
A snapshot represents one committed state of the table. It is not a copy of all data. It is a metadata description of the files that constitute that state. This makes snapshot creation economical relative to copying the dataset and enables time travel, rollback, incremental processing, audit investigation, and reproducible analysis.
Every snapshot points to a manifest list, commonly stored in Avro format. The manifest list contains entries for the manifest files used by the snapshot. It records counts of added, existing, and deleted files and includes partition summaries derived from the partition specification associated with each manifest. These summaries allow a planner to discard entire manifests when their partition ranges cannot satisfy a query predicate.
The manifest list is therefore the first major pruning boundary. A query restricted to one business date, venue family, or partition transform does not need to open every manifest in the table. The planner compares the predicate with manifest-list summaries and opens only potentially relevant manifests. This is one reason Iceberg tables can remain efficient as the number of objects grows, provided that partition specifications, file distribution, and metadata maintenance remain healthy.
The snapshot log also separates current truth from historical truth. The current snapshot is what an ordinary reader sees. A time-travel reader can select a prior snapshot or timestamp according to engine support. A risk report produced at a designated cutoff can store the snapshot ID it consumed. A later correction can create a new snapshot without changing what the earlier report actually read.
This capacity is central to model risk, surveillance, and regulatory reconstruction. The institution should record snapshot IDs as part of report evidence, model-run evidence, data-quality results, and release approvals. A timestamp alone is weaker because the relationship among engine time, catalog time, and event time can be misunderstood. The snapshot ID names the committed table state directly.
Snapshot history is not the same as a permanent records archive. Snapshot expiration removes metadata paths to old states and enables cleanup of files no longer referenced by retained snapshots. A regulated record that must remain immutable for years should be governed by an explicit retention design, potentially including general-purpose S3 with Object Lock, designated report artifacts, source captures, code versions, parameters, and legal-hold procedures. Keeping every table snapshot forever is neither an automatically sufficient control nor an efficient substitute for records management.
The Data Layer of Manifests, Data Files, and Delete Files
A manifest file is an immutable Avro file that lists data files or delete files and records tracking information for each entry. For each data file, Iceberg can record file path, format, partition tuple, record count, file size, column sizes, value counts, null counts, NaN counts, lower bounds, upper bounds, split offsets, sort-order information, and other version-dependent fields.
This is the second major pruning boundary. After the manifest list eliminates irrelevant manifests, the selected manifests allow the planner to eliminate individual data files. If a query requests instrument ABC and a data file’s recorded bounds for the instrument column range from AAA to AAZ, that file cannot contain ABC and does not need to be opened. If a time predicate falls outside a file’s lower and upper timestamp bounds, the same principle applies.
The statistics are file-level metadata, not a global index and not a guarantee that every column metric is present. Writers may omit bounds for some fields, truncate values according to specification rules, or produce metrics that require careful interpretation. Query planning must follow Iceberg semantics, including null and NaN behavior. Sensitive values can also leak through metadata bounds if metrics are collected indiscriminately. A security design should consider which columns receive metrics and who can read metadata, especially for client identifiers, restricted strategy codes, or personally identifiable information.
Data files are typically immutable Parquet objects, although Iceberg also supports Avro and ORC according to the specification. Row-level changes can be represented through file replacement or delete files, depending on the Iceberg format version and writer mode. Position deletes identify rows by data-file path and row position. Equality deletes identify rows by equality values. Iceberg V3 adds deletion vectors and row-lineage capabilities, but an enterprise should enable these only when every critical writer and reader supports the selected features.
The immutability of data and metadata files simplifies concurrency. Writers do not need to edit the currently visible Parquet objects in place. They create replacements and commit a new snapshot. A compaction job can read many small files, write larger files, and commit a snapshot that replaces the old set. Readers pinned to the earlier snapshot continue to read the old files. Readers starting after the commit read the replacements. Physical layout changes while logical table content remains stable.
This explains why direct deletion under an Iceberg table is unsafe. A file that looks old in an object listing may still be referenced by a retained snapshot or an active reader. Cleanup must follow the metadata graph and the configured retention interval. S3 lifecycle policies aimed at the table’s internal objects can break this contract if they expire data independently of Iceberg metadata. Table maintenance, not folder age, should determine when table objects become removable.
How a Multi-File Commit Becomes Atomic
The transaction can be understood as a sequence of private construction followed by one public pointer change.
The writer loads the current table metadata and snapshot. It plans the operation against that base state. It writes new data or delete files to unique object keys. These files exist in S3 but are not part of the table because no committed snapshot references them. The writer creates one or more manifest files describing the new and retained file set. It creates a manifest list for the proposed snapshot. It writes a new table metadata JSON file that includes the proposed snapshot and its relationship to history. Finally, it asks the catalog to replace the current metadata location under a condition that the base metadata location or version has not changed.
Before the final catalog operation, readers follow the old pointer and cannot discover the proposed snapshot through the table. After a successful catalog operation, new readers follow the new pointer and see the complete proposed state. The commit is atomic because the visibility decision is concentrated in the pointer update, not because S3 locked or renamed every object together.
If the pointer update fails, the former table remains valid. The newly written objects may become orphaned. Maintenance can remove them after a safety interval. This failure mode is preferable to partial visibility, but it has cost and operational implications. A platform with repeated commit conflicts can accumulate unreferenced files and unnecessary write charges. Conflict metrics, retry behavior, and cleanup health must be monitored.
Serializable isolation is achieved through validation rules that prevent an operation from committing when concurrent changes invalidate its assumptions. Snapshot isolation is appropriate for other operations where the writer need only commit relative to a consistent base snapshot. The selected engine and operation determine the available isolation behavior. A business owner should not receive a generic promise of “ACID” without a description of the actual table, operation, catalog, and engine semantics.
Why This Matters to the Trading Desk
A trading desk is an adversarial environment for weak data semantics. Events are frequent, corrections are normal, deadlines are fixed, and the cost of an inconsistent view rises under market stress.
An order may progress through created, routed, acknowledged, partially filled, canceled, corrected, and allocated states. The source systems may deliver those events through different channels. A venue reconnect can replay messages. A broker drop copy can arrive after the desk’s execution event. Corporate actions can alter instrument interpretation. Reference data can arrive after a market event. A late allocation can move economic exposure between accounts. The table must preserve history while serving a current view.
Iceberg supports an append-oriented event ledger in which each event is immutable and corrections are explicit. A separate current-state table can derive the latest valid state. The event table protects evidence. The current-state table serves operational analytics. Both can use snapshots so that an intraday risk calculation records exactly which committed state it consumed.
Market data creates a different pressure. High-frequency sources can generate many small files when low-latency micro-batches are used. Those files increase metadata planning and object-request overhead. Compaction rewrites physical layout without changing logical content. S3 Tables can automate file compaction and other maintenance, reducing the burden on desk platform engineers. The writer should still produce reasonable output and the team should still monitor file distribution. Managed maintenance is not permission to create uncontrolled pathology.
Regulatory reporting creates a reconstruction requirement. A report should retain the table snapshot IDs, source cutoffs, query or transformation version, configuration, approval, and output artifact. When a correction occurs later, the institution can reproduce what the report saw and separately show the corrected state. This is stronger than copying arbitrary files into a report folder without a committed table context.
Surveillance creates a model-integrity requirement. Feature generation must not mix old and new table states during one run. A snapshot-pinned read gives the model a coherent dataset. The model-run record should include the snapshot IDs of every input table. Because Iceberg atomicity is normally table-scoped, the workflow must coordinate a consistent portfolio of input snapshots across tables.
Intraday risk creates a freshness-versus-consistency decision. The system should not silently prefer speed. It should define when a stale but reconciled snapshot may be shown, when a partially reconciled view must be labeled, and when publication must fail closed. Iceberg provides precise states. Governance determines which state is acceptable for each decision.
Amazon S3 Tables as a Native Iceberg Operating Model
S3 Tables makes the table a first-class S3 resource through table buckets, namespaces, tables, table ARNs, managed maintenance, and Iceberg access paths. This is materially different from treating a general-purpose S3 prefix as an unmanaged warehouse directory.
The direct S3 Tables Iceberg REST endpoint implements standardized Iceberg REST APIs and translates them into S3 Tables operations. A compatible client uses the regional endpoint, the table-bucket ARN as its warehouse identifier, and SigV4 authentication with the S3 Tables signing name. This enables clients such as Spark and PyIceberg to work through an open catalog protocol rather than a proprietary SDK-only path.
The AWS Glue Iceberg REST endpoint provides another route and is the recommended path when the institution wants unified catalog management, centralized governance, and fine-grained access. It uses SigV4 and can be governed through IAM, Lake Formation, or hybrid permissions. The choice is not merely technical. It determines how the enterprise grants access, shares tables, audits operations, integrates external clients, and separates catalog administration from data use.
The open REST surface lowers integration friction, but no-vendor-lock-in claims should remain precise. Iceberg reduces data-format lock-in. REST catalog standards reduce catalog-client coupling. IAM, Lake Formation, KMS, networking, telemetry, and managed-maintenance policies remain platform commitments. The responsible promise is architectural reversibility, not an imaginary absence of switching cost.
Step 1: Define the Unit of Truth Before Creating Infrastructure
Begin with one trading data product and write its semantic contract in prose. Define what constitutes an event, which source is authoritative, how duplicates are identified, how corrections are represented, which timestamps are carried, how business-effective time differs from processing time, what creates a new snapshot, which consumers may read unvalidated data, and what evidence must survive snapshot expiration.
Define the transaction boundary. If one business process changes several Iceberg tables, state that those table commits are not automatically one atomic cross-table transaction. Define the orchestration record that binds their snapshot IDs into one business release. This record may be a control table whose row moves from prepared to approved only after every component snapshot passes reconciliation.
Define current and historical truth separately. Record whether the platform uses an immutable event ledger, a corrected event view, a current-state table, or all three. Avoid an architecture in which one mutable interpretation must serve evidence, operations, models, and reporting simultaneously.
Define the data owner, technical owner, control owner, access approver, retention owner, and incident decision maker. Ownership must be explicit before the platform is provisioned.
Step 2: Establish the AWS Control Boundary
Use AWS Organizations to separate production data workloads, non-production workloads, security, and central logging. Use IAM Identity Center for human access and temporary roles. Create distinct permission sets for platform administration, table administration, ingestion, transformation, analytics, audit, and emergency recovery.
Open AWS Key Management Service and create customer-managed keys where policy requires separable key ownership, cross-account control, or explicit revocation. Keep key administration separate from data use. Ensure that the workload roles have only the encrypt, decrypt, and data-key permissions required for their path.
Enable organization-level CloudTrail and deliver logs to a protected logging account. Monitor catalog updates, role assumptions, denied access, KMS usage, table policy changes, and destructive operations. The team investigating a table incident must not depend on logs controlled by the same role that can alter the table.
Select an AWS Region after confirming S3 Tables availability, Glue REST integration, Athena and EMR requirements, residency constraints, connectivity, disaster-recovery design, and the location of producers and consumers.
Step 3: Choose the Catalog Pattern Explicitly
For a managed Iceberg table in a general-purpose S3 bucket, use AWS Glue Data Catalog as the catalog unless a validated requirement justifies another implementation. Configure Spark or Glue to use the Glue catalog and S3 file I/O. Use optimistic locking through the current Glue integration. Retain DynamoDB lock-manager settings only for legacy combinations that require them, such as the documented Glue 3.0 and Iceberg 0.13.1 path, and place those environments on an upgrade roadmap.
For new purpose-built tabular storage, create an S3 table bucket and use S3 Tables. Choose the direct S3 Tables REST endpoint for a basic single-table-bucket access model or supported custom and partner catalog scenarios. Choose the AWS Glue Iceberg REST endpoint when centralized governance, unified discovery, and Lake Formation controls are part of the target model.
Document the catalog endpoint, warehouse identifier, authentication mode, signing name, signing Region, table namespace, incident owner, and recovery path. Treat catalog configuration as controlled infrastructure, not an application string copied between notebooks.
Step 4: Create the Storage and Namespace Through the AWS Console
Sign in through IAM Identity Center with the approved table-administrator role. Open the Amazon S3 console. Navigate to Table buckets and create a table bucket in the approved Region. Apply the enterprise naming convention without embedding restricted business information in resource names. Record the table-bucket ARN.
Create namespaces aligned to durable business domains such as market_data, orders, executions, positions, risk, surveillance, or regulatory. Avoid namespaces based only on temporary teams or projects. A namespace can support organization and governance, but sensitive tables should still receive table-specific authorization.
Create the first table using an explicit schema. For an execution-event table, include stable event identity, source identity, order identity, execution identity, instrument identity, venue, side, quantity, price, currency, event time, source sequence, ingestion time, processing time, correction relationship, payload hash, schema version, producer version, and validation status.
Choose partition transforms based on query and maintenance economics. A day transform on event time may be appropriate. High-cardinality identifiers should not become direct folder-style partitions. Iceberg hidden partitioning allows the specification to evolve without forcing consumers to encode directory logic.
Use decimal types for economic quantities and prices where exact decimal semantics are required. Define timezone behavior explicitly. A nanosecond timestamp type can preserve precision where supported, but precision of storage does not prove accuracy of the source clock.
Series: Financial Service (33 articles)
- …
- 28Apache Iceberg Atomic Transactions on Amazon S3: Rebuilding the Source of Truth for the Cloud-Native Trading Desk - Part 1 This article
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article