Modernizing mainframe Assembler to Java using Amazon Bedrock and AWS Transform AWS published a five-phase methodology for converting mainframe Assembler programs into Java Spring Boot services on AWS using Amazon Bedrock, the Kiro IDE, and AWS Transform, routing the code through an intermediate COBOL stage rather than a direct Assembler-to-Java conversion. The approach targets banking, insurance, and airline customers whose Assembler batch jobs still run critical operations but depend on a shrinking pool of experts, and AWS says the intermediate COBOL step gives subject matter experts a human-readable format to validate business rules before final transformation. Prerequisites include an AWS account with least-privilege IAM permissions for Amazon Bedrock, AWS Transform, and Amazon S3, access to Amazon Q Developer or Kiro, and test data sets with expected outputs for functional equivalence testing. Artificial Intelligence https://aws.amazon.com/blogs/machine-learning/ Modernizing mainframe Assembler to Java using Amazon Bedrock and AWS Transform Imagine a batch job that has run every night for decades without failing, and the only person who understands its code is about to retire. We have seen this situation again and again while working with banking, insurance, and airline customers. Their Assembler programs still run critical business operations, but fewer people can read them each year. Rewriting them by hand takes years, risks breaking business rules nobody remembers writing, and still depends on the same experts who are leaving. Amazon Bedrock https://aws.amazon.com/bedrock/ and AWS Transform https://aws.amazon.com/transform/ change that equation. This post shows you a multi-stage transformation methodology using Amazon Bedrock https://aws.amazon.com/bedrock/ , Kiro IDE https://kiro.dev/ an AI-powered integrated development environment , and AWS Transform https://aws.amazon.com/transform/ that can help reduce modernization time compared to manual approaches while maintaining business logic integrity through validation checkpoints. You will learn how to systematically extract business rules from Assembler code, convert them through an intermediate COBOL stage, and deploy modernized applications as Java Spring Boot services on AWS. Prerequisites Before starting the modernization process, make sure you have: - Active AWS account https://aws.amazon.com/account/ with least-privilege AWS Identity and Access Management IAM permissions for Amazon Bedrock, AWS Transform, and Amazon Simple Storage Service Amazon S3 . - Access to Amazon Q Developer https://aws.amazon.com/q/developer/ or Kiro https://kiro.dev/ for AI-assisted code analysis. - Access to AWS Transform for COBOL to Java conversion. - Access to Amazon Bedrock with appropriate foundation models FMs . - An Amazon S3 https://aws.amazon.com/s3/ bucket configured for source code and artifact storage, with encryption and Block Public Access enabled. - Knowledge of the target business domain and application functionality. - Availability of business and technical subject matter experts SMEs for validation sessions. - Source Assembler code inventory with available documentation. - Test data sets with expected outputs for functional equivalence testing. Solution overview You can transform legacy mainframe Assembler applications tightly bounded with COBOL into Java Spring Boot applications built for the AWS cloud through a systematic five-phase approach. This multi-stage methodology, converting Assembler to COBOL as an intermediate step before Java transformation, reduces risk and preserves business logic with greater reliability than direct Assembler-to-Java conversion. The intermediate COBOL stage provides a structured, human-readable format that subject matter experts SMEs can validate before final transformation. This makes sure that business rules remain intact throughout the modernization journey. The following sections describe both the current mainframe architecture and the target cloud-focused state. Current state Your current architecture represents a traditional mainframe environment where Assembler programs execute batch processes, connected with COBOL, interact with databases, and process files. At its core, JCL Job Control Language jobs trigger Assembler program execution at scheduled intervals. These programs read input from VSAM Virtual Storage Access Method and sequential files and perform operations against IBM Db2 for z/OS. Your business logic executes using low-level register operations direct CPU register manipulation and memory management. Output is written back to files or database tables, and job completion status is reported through JCL return codes. All of this runs on IBM z/OS mainframe infrastructure. Target state The modernization solution helps you transform legacy mainframe Assembler applications into Java applications built for the AWS cloud through a multi-phase, AI-powered workflow. The architecture uses Amazon Bedrock and Kiro IDE for AI-assisted code analysis and business rule extraction, and AWS Transform for automated COBOL-to-Java conversion. If COBOL source code is already available, you follow the conventional approach and provide it directly to AWS Transform for conversion to Java Spring Boot applications. With this solution, you can achieve: - Reduced transformation time compared to manual approaches. - Systematic business logic preservation through validation checkpoints. - Human-in-the-loop validation at critical stages. - Automated code conversion with functional equivalence testing. You begin the transformation workflow by analyzing Assembler code to generate Business Rules Extraction BRE documentation. You then create detailed functional specifications with human-in-the-loop refinement. The validated specifications guide the Assembler-to-COBOL conversion, generating intermediate COBOL code that bridges the gap between low-level hardware instructions and business-oriented constructs. This COBOL code undergoes functional equivalence testing before AWS Transform converts it to Java, with validation checkpoints at each phase to reduce risk and verify business continuity. Business rules extraction with AI The quality of your Business Rules Extraction BRE directly impacts transformation accuracy, so focus carefully on this phase. Use Amazon Bedrock, through Kiro IDE or the Amazon Bedrock console, along with AWS Transform for mainframe to extract and document business rules from your Assembler source code. You can use the prompts in this post directly in Amazon Bedrock through the Chat Playground https://docs.aws.amazon.com/bedrock/latest/userguide/playgrounds.html , or within Kiro IDE using its built-in AI chat and Spec panel https://kiro.dev/docs . Replace the placeholder values with your actual Assembler code and context before running. Amazon Bedrock is the inference platform behind the first four phases: business rules extraction, specification creation, Assembler-to-COBOL conversion, and validation. Choose a foundation model with strong code reasoning and a large context window, because Assembler programs are long and dense. Set the temperature to 0 so you get consistent output across runs. To process many programs, call the same prompts through the Amazon Bedrock Converse API and store each output in your Amazon S3 bucket so it can feed the next phase. Amazon Bedrock doesn’t use your prompts or model outputs to train AWS models or share them with third parties. For details, see Data protection in Amazon Bedrock https://docs.aws.amazon.com/bedrock/latest/userguide/data-protection.html . Use sanitized test data instead of production data or personally identifiable information PII . The more context you provide to the AI, the better it understands the business intent behind the code. Include relevant documentation, data dictionaries, and available business context alongside the Assembler code when prompting. Note: Save the output of each prompt as you go. You will need them as inputs in the next phase. Example prompt for context-aware analysis: You can customize this prompt by adding domain-specific terminology from your business context. When you run this prompt, you will see structured JSON output that you can use for automated validation and direct integration with downstream transformation tools. Data mapping accuracy directly affects conversion quality. Incomplete mappings can lead to lost or corrupted business logic. Validate with SMEs Treat AI-generated BRE documents as drafts, not final outputs. Have subject matter experts review and validate the extracted rules before moving forward. Document discrepancies in a validation log and update the BRE based on SME feedback before proceeding to specification creation. To help SMEs validate the rules, supplement textual BRE documents with visual aids like flowcharts and data flow diagrams. Maintain a validation checklist covering business rule accuracy, data mapping correctness, edge case handling, and error condition completeness. Extracting spec-driven data flow After you validate business rules with SMEs, translate them into detailed functional specifications that will guide code conversion. This spec-driven approach confirms that business requirements are clearly documented and agreed upon before code transformation begins, reducing costly rework later. Use the extracted BRE documents to create complete functional specifications that guide COBOL code generation. These specifications should include program overview, COBOL data structures, process flow design, and business rules coverage mapping. Example prompt for functional specification generation: You can adjust the data structure specifications based on your COBOL standards. When you run this prompt, you will receive a complete functional specification with full traceability from business rules to COBOL structures, ready for SME review and direct integration with Kiro for code generation. Converting legacy Assembler to COBOL With validated functional specifications in hand, the next phase uses these structured outputs to guide the Assembler-to-COBOL conversion. The intermediate COBOL step helps you bridge the gap between low-level hardware instructions and business-oriented constructs, which helps you verify that business logic is preserved before the final Java transformation. Example prompt to guide the conversion: