Migration & Modernization
Reimagine your mainframe applications with Agentic AI and AWS Transform
In this blog post, we outline the AWS approach to modernizing mainframe legacy applications through the reimagine pattern, showcasing how organizations can transform legacy COBOL applications into modern, cloud-native architectures.
Organizations are facing urgent imperatives to modernize their legacy mainframe applications due to talent shortages, increasing costs, and restrictions on business agility.
AWS supports multiple approaches to modernize mainframe applications. The reimagine pattern will allow organizations to introduce functional changes to the modern application by reimagining customer experiences, optimizing the business process flows, and introducing new features. During this process, you have the opportunity to modernize your mainframe application. This involves rearchitecting and rewriting applications using modern architecture and technology stacks. To accelerate the transformation journeys, the reimagine mainframe modernization pattern is supported by a set of agentic AI-powered tools.
The strategic imperative to reimagine mainframe applications
AWS recognizes that mainframe modernization is not a one-size-fits-all proposition. While tactical approaches focus on augmentation and maintaining existing systems, strategic modernization offers distinct paths: replatform, refactor, replace, and reimagine. The reimagine approach represents the most transformative path, where organizations completely rethink their application architecture using modern patterns like microservices or moving from batch process to real-time functions.
Most customers follow the 80/20 principle when considering reimagining strategies. Reimagine is a good fit when the business requires functional enhancements to be made to the applications. Customers expect only a portion of their mainframe workloads to fall into this category. In this situation, the business may have desires for modern UIs, real time capabilities, or faster batch processing. Customers may also have goals to break legacy monoliths into product aligned business functions. Customers might find that 80% of their mainframe applications may not require functional changes, while 20% are constraining customers in ways that genuinely benefit from business-level modifications. However, some organizations prioritized longer-term business transformation over short-term migration efficiency, demonstrating that pattern selection depends on strategic objectives rather than only the proportion of applications needing functional changes. This insight is one of the aspects that drive AWS multi-pattern strategy, enabling customers to select the optimal modernization approach for each workload5.
At the heart of AWS’s reimagine strategy lies AWS Transform for mainframe, an agentic AI-powered service that accelerates mainframe application modernization. The service enables customers to transform monolithic applications written in languages like COBOL into more modern architectural styles, like microservices. Central to AWS reimagine strategy is the principle of ‘Human in the Loop’ validation, which requires AI-generated application specifications and code are continuously validated by domain experts. AWS Transform for mainframe provides powerful reverse engineering, while Kiro generates microservice specifications. However, human expertise remains essential throughout the process. Experts are needed to validate business logic interpretation, confirm architectural boundaries, and validate applications meet all requirements. This collaborative approach between AI capabilities and human judgment significantly reduces transformation risk while maintaining the speed advantages of AI-powered modernization.
The strangler fig pattern: Enabling progressive modernization
Recognizing that enterprise customers rarely pursue big-bang modernization approaches, where all applications are migrated off the mainframe simultaneously, the Strangler Fig application pattern is a proven choice for progressive modernization. This pattern provides a safe approach to modernizing mainframe applications through three phases: transform, coexist, and eliminate.
The Strangler Fig Pattern is a progressive modernization approach. It allows organizations to gradually replace monolithic applications with microservices while keeping the original application running. This approach works by incrementally extracting features from the monolith. These extracted features are transformed into new microservices around the existing system. Integration patterns then enable connection between the new microservices and legacy applications.
During the coexistence phase, both mainframe and new systems on AWS operate simultaneously with integration between systems. The integration patterns support three types of integration: Application to application integration, application to data integration, data to data integration4.
Building this integration architecture and choosing the right integration patterns for coexistence will require customers to pay specific attention to data consistency, transaction management, and performance across the hybrid environment.
Understanding microservices architecture for mainframe modernization
Microservices architecture emphasize breaking down a system into smaller, independent services that can be developed, deployed, and scaled independently, contrasting with traditional mainframe monolithic architectures. In the context of mainframe modernization, microservices offer key valuable characteristics including clear bounded contexts, independent deployment, technology diversity, and scalability.
Combined with event-driven architecture, microservices are particularly powerful when moving from batch processing to real-time processing, enabling systems to react to changes asynchronously.
While microservices offer significant benefits, they’re not universally the best solution. Alternative approaches like modular monoliths or macroservices may be more appropriate when data consistency or transactionality is required. The key is selecting an architecture that aligns with both current needs and future aspirations.
Reimagine, a three-phase modernization approach
The reimagine pattern transforms legacy mainframe applications into cloud-native microservices through a three-phase methodology.
- Reverse Engineering to extract business logic and rules from existing COBOL/JCL code using AWS Transform for mainframe.
- Forward Engineering to generate both microservice specifications and source code using AI Agents / Kiro.
- Deploy and test to deploy the generated microservices to AWS using Infrastructure as Code and to test the functionality of the modernized application.
Reimagine, a three-phase modernization approach
Phase 1: Reverse Engineering
This diagram highlights the scope of reverse engineering using AWS Transform for mainframe.
Reverse Engineering using AWS Transform
The foundation of successful modernization begins with deep legacy application understanding. AWS Transform combines and analyzes information from multiple sources: mainframe source code and operational data (Scheduler plan, monitoring data). This phase produces critical outputs including:
- Technical Documentation: AWS Transform automatically analyzes source code to create detailed documentation of application programs. This documentation includes descriptions of program logic, flows, integrations, and dependencies within legacy systems. It helps preserve critical knowledge about legacy systems while reducing dependency on retiring mainframe experts. It also reduces the project time traditionally consumed by analysis and planning.
- Business Logic Extraction: Business Logic Extraction represents a critical capability in mainframe modernization that decomposes complex monolithic applications into their constituent business functions. AWS Transform automatically analyzes COBOL source code. This analysis helps identify and document critical business elements, including process flows and business logic embedded within legacy applications. This decomposition process is fundamental to breaking down mainframe monoliths into smaller, more manageable business functions. These functions serve as the foundation for identifying the scope and boundaries of microservices in later stages of the reimagine journey. This capability serves multiple stakeholders in the modernization journey by providing exportable natural language specifications that both technical and business users can understand.
- Mainframe Data Model: AWS Transform provides advanced data analysis capabilities that are essential for successful mainframe modernization, including data lineage analysis and automated data dictionary generation. These features work together to define the “what” (structure and meaning) to accompany the “where” (usage and relationships) of mainframe data. Organizations gain complete visibility into their data landscape, enabling informed decision-making for modernization. Technical teams can confidently redesign data architectures while preserving critical business logic and relationships.
- Activity Metrics Analysis: Static code analysis can be complemented with runtime data gathered from the mainframe via System Management Facility (SMF). SMF is the central mechanism for collecting activity data on z/OS subsystems. The information contained in these records is critical for modernization planning, prioritization, and execution. AWS Transform can analyze SMF data (record types 30 for Batch processing and 110 for CICS transactions) to identify active batch jobs and CICS transactions. By detecting used/unused transactions/batches and measuring MIPS consumption of transactions/batches, organizations can identify unused programs and high-consuming resources. This enables data-driven decisions about what to migrate and what to retire, providing unprecedented visibility into mainframe resource utilization.
Phase 2: Forward Engineering
Forward Engineering aims to transform the extracted business logic into a macroservices / microservices architecture.
AWS embraces a flexible partner- and customer-driven approach for code generation, acknowledging the diverse needs within customer organizations. Rather than competing with existing developer tools, AWS focuses on facilitating the rich understanding developed during reverse engineering, such that existing code can be accurately translated into modern applications through multiple paths:
- Customer- or partner-driven development using preferred development tools like Kiro or other coding assistants
- Kiro and AI agents as the AI-powered coding assistant.
AWS Transform works in collaboration with AI-powered coding assistants like Kiro to support specification-driven development. These tools complement each other: AWS Transform provides outputs that serve as inputs for Kiro to generate both microservice specifications and source code.
Let’s dive deep into the Kiro and AI agent’s approach. This approach is made up of three distinct steps, with humans in the loop verifying validation and quality.
This diagram highlights the scope of forward engineering using Kiro / AI agents.
Forward engineering using Kiro / AI agents
Step 1: Microservice specification generation
Using AI agents or Kiro and the business logic extraction as input, this step creates detailed specifications for each microservice. Kiro’s spec-driven approach enables architects to design microservices, creating formal specifications that allow application subject matter experts to review and refine those specifications before implementation begins. The creation of project-specific steering documents improves Kiro’s understanding of the inputs (business logic, data analysis, non-functional requirements, etc.) and the requirements. During this step, traceability and comprehensive coverage of business rules must be validated. This enables tracking that all identified business logic has been properly analyzed and incorporated into the relevant microservice specifications.
Here is a sample of a steering file to ask Kiro to generate the microservices specifications.
Sample of a steering file to generate the microservices specifications
Step 2: Target database generation
Database modernization represents a pivotal challenge in mainframe transformation projects. Legacy mainframe databases use hierarchical or network databases like IMS DB or IDMS, or relational databases like Db2. These databases contain decades of business-critical data structured according to now-outdated data models. The target database generation phase transforms these legacy data structures into modern, cloud-native database schemas that support the microservices architecture while preserving data integrity and business rules. AWS Transform’s data analysis capabilities provide a comprehensive understanding of the legacy database structure. Using this analysis as input combined with the target application specification, Kiro creates the target modernized database.
Step 3: Source code and infrastructure as code generation
Following specification validation, Kiro transitions into the implementation phase where it generates production-ready microservice code and infrastructure as code. The implementation process follows Kiro’s three-phase workflow of requirements definition, design, and implementation tasks. During this phase, Kiro can autonomously execute implementation tasks. Meanwhile, developers can focus on reviewing generated code, providing feedback, and validating the implementation against requirements. Critical to this process are steering files, which provide Kiro with persistent knowledge about the project’s conventions, libraries, and standards, maintaining adherence to established architecture guidelines and coding practices. This structured approach allows teams to review and refine implementation strategies. It also supports the generation of comprehensive test cases and test data for quality assurance activities.
Here is a sample of a steering file to ask Kiro to generate the target source code of a microservice.
Sample of a steering file to generate the target source code
Here is a sample of the tasks file generated by Kiro from the prompts and the steering files to implement the microservices.
Sample of the tasks file to implement the microservices
Phase 3: Deploy and Test
The final phase deploys the generated microservices to AWS Cloud native architecture using a variety of compute and storage options. Customers can choose from Amazon Elastic Container Service (ECS), Amazon Elastic Kubernetes Service (EKS), AWS Lambda, and AWS Fargate for compute services. Database options include Amazon DynamoDB for NoSQL workloads, Amazon Aurora for relational databases, or other AWS database services. The deployment uses infrastructure as code tools such as AWS CloudFormation, AWS Cloud Development Kit (CDK), or Terraform to model and provision the AWS resources.
Here is a sample of the generated infrastructure as code using AWS CloudFormation Templates to deploy the new microservices architecture to AWS Cloud.
Sample of the generated Infrastructure-as-Code
The new reimagined application will be tested in this new AWS Cloud native architecture to validate that all components work together as expected.
This diagram highlights a typical AWS Cloud native architecture to deploy the new reimagined application.
Deploy and test the new reimagined application
Key benefits of the AI-driven approach for the reimagine pattern
Accelerated discovery and analysis
AWS Transform’s AI agents can analyze complex COBOL codebases in hours or days, automatically identifying application domains and business logic patterns. Organizations can choose to analyze their entire mainframe environment or target specific business processes.
Intelligent microservice design
The AI-powered approach applies Domain-Driven Design (DDD) principles to identify natural bounded contexts within legacy applications. DDD places a primary focus on understanding the core business domain, building a shared language between technical and business teams, and dividing complex domains into clearly defined bounded contexts with explicit boundaries.
Quality code generation
Kiro generates production-ready microservices that follow modern development standards, including proper layered architecture, REST API design, and cloud-native patterns.
Infrastructure as Code
The approach generates both the application code and the complete infrastructure needed to deploy and run the microservices on AWS Cloud. Additionally, this infrastructure as code approach aligns with AWS Well-Architected Framework principles by promoting operational excellence through automated, repeatable deployments and enabling consistent application of security, reliability, performance efficiency, and cost optimization, and best practices across all generated infrastructure components.
AWS mainframe modernization expertise and partner ecosystem
The AWS approach to reimagining mainframe applications leverages AWS AI-driven capabilities and complementing the expertise and scale of partners. AWS has established a robust partner ecosystem that combines the expertise of Global System Integrators (GSIs) and specialized technology partners to address the complexities inherent in mainframe modernization projects.
GSI partners demonstrate proven success in large-scale mainframe modernization across diverse industries.
The AWS strategy relies on technology partners to provide specialized modernization tools complementing AWS native capabilities including data migration utilities, testing frameworks, and language conversion tools.
This collaborative approach enables customers to benefit from AWS cloud-native capabilities while accessing specialized expertise and proven methodologies for complex modernization challenges.
Conclusion
AWS support for reimagining mainframe modernization represents a comprehensive, AI-driven approach that will accelerate customer transformation journeys. By combining deep understanding of legacy source code with flexible code generation, AWS Transform enables organizations to transform mainframe applications while minimizing risk and maximizing business value.
Additional AWS Transform for mainframe and Kiro resources: