There is a great deal of excitement about using AI to modernize mainframe applications, and boards and CIOs are actively looking for a plan. AI is a genuine accelerator for COBOL modernization, but on its own it is not enough: source code alone does not give a model the context it needs to produce reliable results. The lessons below draw on Amazon Web Services’ experience modernizing legacy systems for hundreds of enterprise customers, and they apply well beyond any single tool.
The two halves of mainframe modernization
Mainframe modernization has two very different parts. The first is reverse engineering: understanding what the existing systems actually do. The second is forward engineering: building the new applications. The first part is where most projects live or die, yet AI coding assistants are mainly good at the second. Given a clear, valid specification, they will build modern applications quickly; without one, they fill the gaps with guesses. Successful COBOL modernization therefore depends on a process that can reliably reverse engineer a system, produce valid and traceable specifications, and only then hand a clean brief to the AI that writes new code.
What a successful modernization needs
Bounded, complete context
Large programs overwhelm a model when fed in arbitrary fragments. The work goes better when the system is broken into bounded units that already contain everything the AI needs to reason about them. That lets the model focus on what it does well, understanding business logic and formulating specifications, rather than guessing at connections it cannot see.
Platform-aware inputs
A detail that surprises many teams: the same COBOL source can behave differently depending on the compiler and runtime. How numbers are rounded, how data sits in memory, and how programs talk to middleware are not always visible in the source code; they are determined by the specific environment the code was built for. Decades of hardware and software integration cannot be reproduced by simply moving code. AI does its best work when that platform-specific behaviour has already been resolved. Fed clean, platform-aware inputs, it performs well; fed raw source, it can produce output that looks correct but behaves differently from the original. In financial systems, an integer-rounding difference is not a cosmetic bug.
A traceable basis
Modernizing a regulated system means being able to demonstrate the work. Each generated specification should map back to the original code, so that when a regulator or auditor asks whether anything was missed, there is deterministic evidence to point to rather than an opaque model output. Traceability is what turns an impressive demonstration into something a bank can actually put into production.
How AWS Transform approaches the problem
These principles are the basis of AWS Transform, which Amazon describes as an agentic AI service for large-scale migration and modernization. It begins by building a complete, deterministic model of the application: specialized agents extract code structure, runtime behaviour, and data relationships across the whole system rather than one program at a time, producing a dependency graph aligned with actual compiler semantics and capturing cross-program dependencies, middleware interactions, and platform-specific behaviour before AI is involved. Larger programs are then decomposed into bounded units sized for the model to process. Only after that does AI extract the business logic in natural language, with each output validated against the deterministic evidence already gathered. In short, deterministic analysis serves as the foundation and AI as the accelerator.
Choosing the right path for each application
Not every application should travel the same road. Some are reimagined; some need only a clean, deterministic conversion to a modern language such as Java; some should leave the data centre first and modernize later; and some will stay on the mainframe. Treating them all the same is a common way for projects to fail. Portfolio decisions, which application, which path, and in which order, matter as much as the technology itself.
Test data is another routinely overlooked requirement. It is impossible to prove that a modernized application behaves like the original without real production data and realistic scenarios. Teams sometimes reach the code-transformation stage and stall because no one planned for data capture, which is why test planning and data capture belong in the process from the start rather than as a cleanup at the end.
Results reported so far
Amazon has published several customer outcomes for AWS Transform. The BMW Group reported a 75 percent reduction in testing time and a 60 percent increase in test coverage. Fiserv completed a project originally estimated at more than 29 months in 17. Itau Unibanco reported cutting application discovery and testing time by more than 90 percent and modernizing applications roughly 75 percent faster than its previous manual efforts. These are vendor-reported figures from selected projects, so they should be read as illustrative of what is achievable rather than as guaranteed results.
Limitations and what to watch
The approach is powerful, but several cautions are worth keeping in mind. The headline metrics come from the vendor and from customers with significant resources, and individual results vary with the size, age, and documentation of a codebase. AI still makes mistakes when extracting business logic, which is precisely why the deterministic validation layer matters; removing that rule-based and human checking to move faster reintroduces the risk of plausible-but-wrong output. Modernization also remains a major undertaking measured in months, not weeks, and the hardest problems are often organizational, such as securing access to undocumented systems, aligning stakeholders, and capturing production data, rather than purely technical. Finally, moving off a mainframe trades one set of dependencies for another; the destination platform brings its own costs, skills requirements, and lock-in considerations that belong in the decision from the outset. As with other forms of governed AI agents, the value comes from pairing automation with strong guardrails.
The takeaway
AI is reshaping mainframe modernization, but the durable lesson is not that AI can read old code and rewrite it unattended. It is that AI works best on a deterministic foundation: reliable reverse engineering, platform-aware inputs, traceable specifications, and a realistic plan for which applications move and how they are tested. Organizations that treat AI as an accelerator on top of that foundation, rather than a replacement for it, are the ones turning AI projects into operational results.