Modernizing Legacy Architectures with Amazon Bedrock and Generative AI
Author
Maxime Roth Fessler
Date Published
Cloud migration is rarely as straightforward as a simple lift-and-shift exercise. In practice, engineering teams are often faced with a significant modernization gap: the challenge of transforming large volumes of legacy infrastructure documentation into a scalable and cloud-native architecture.
The Problem: The Friction of Legacy
Modernization projects often slow down due to two recurring challenges:
Interpreting Legacy Infrastructure
Engineering teams frequently spend weeks reviewing outdated diagrams, undocumented dependencies, and aging on-premise environments built around virtual machines and monolithic applications.
Translating Legacy Requirements into Cloud Services
Converting traditional infrastructure patterns into modern cloud services requires careful architectural planning. For example, moving from manually managed load balancers and physical application servers to services such as Amazon ECS with AWS Fargate and AWS Application Load Balancer introduces opportunities for misconfiguration, overlooked dependencies, and inconsistent modernization decisions.
The Vision: Accelerating Architecture Modernization

Screenshot of the AWS Cloud Migrator Tool
AWS Cloud Migrator is an experimental AI-powered modernization assistant designed to help engineering teams transform legacy infrastructure into modern AWS architectures.
Using Amazon Bedrock and Claude 3, the tool analyzes legacy infrastructure descriptions and proposes a modern target architecture. It visualizes the result through an interactive React Flow diagram, generates a migration insights table, and scaffolds initial infrastructure code to support further refinement.
The Goal: Turning Legacy Descriptions into Visual Architectures
The primary objective of the tool is to reduce the time required to interpret and modernize legacy infrastructure descriptions. A paragraph describing manual failovers, physical database clusters, and aging middleware can be transformed into a visual architecture containing Amazon VPCs, Amazon RDS instances, and Amazon ECS clusters within seconds.
Experimental Scope and Limitations
AWS Cloud Migrator is currently designed as an experimental prototype. While the tool generates Terraform code, the output should be treated as a foundational blueprint rather than production-ready infrastructure.
The generated configurations are intended to accelerate early-stage architecture planning by eliminating the need to start from scratch. Security controls, networking policies, compliance requirements, and production hardening still require review and refinement by engineering teams.
In this article, we explore how Generative AI and Amazon Bedrock can help transform legacy infrastructure descriptions into structured modernization roadmaps and visual cloud architectures.
The Tech Stack: Core Components
To build a tool that feels responsive and professional, we selected a stack that balances performance with deep architectural reasoning. Below is a breakdown of the core components:
- The Brain - Amazon Bedrock & Claude 3: Amazon Bedrock and Anthropic Claude 3 were selected for their ability to process structured infrastructure descriptions and generate consistent outputs. The model is used to produce the JSON structures required for architecture diagrams, migration insights, and Terraform scaffolding.
- The Face - React Flow & Vite: The frontend is built using React Flow and Vite to provide an interactive visualization layer for generated architectures. This allows infrastructure components such as Amazon VPCs, subnets, databases, and compute services to be represented as connected architectural diagrams rather than static documentation.
- The Backbone - AWS Lambda & Serverless: The backend uses AWS Lambda and a serverless proxy pattern to manage communication with Amazon Bedrock and handle session archival in Amazon S3. This approach keeps credentials isolated from the frontend while maintaining a lightweight and cost-effective deployment model.
The synergy between these tools creates a seamless loop: the user provides the context, the AI performs the heavy lifting, and the interface renders a workspace ready for further refinement.
Source Code and Repository
The full project source code, including the React frontend and Terraform configurations used to deploy the backend proxy, is available in the project GitHub repository. The repository also includes documentation and setup instructions for deploying the tool in an AWS environment.
Architecture Deep Dive: Converting Text into Structured Architecture Data
One of the primary technical challenges of the project was transforming unstructured legacy infrastructure descriptions into structured and interactive architecture representations. To achieve this, the tool uses a multi-stage pipeline that converts natural language inputs into structured infrastructure metadata and visual graph components.
The Transformation Pipeline
When an infrastructure description is submitted, the request is routed through a Lambda proxy to Amazon Bedrock. Specialized system prompts are used to guide the model toward generating outputs that conform to a predefined JSON schema. This schema defines:
- Nodes: Identifying AWS services (Fargate, RDS, S3) and their metadata.
- Edges: Mapping the networking and data flow between these services.
- Metadata: Categorizing each move under a migration strategy such as Replatform or Refactor.
Iterative Refinement via Chat
Modernization workflows typically evolve through multiple design iterations. To support iterative refinement, the tool includes a stateful chat interface that allows the generated architecture graph to be modified dynamically.
For example, when a request is made to insert an Amazon SQS queue between an API service and a worker service, the backend reconstructs the JSON graph model, updates the React Flow state, and regenerates the corresponding architecture representation in real time. This enables the visual architecture and its underlying infrastructure model to evolve together during the design process.
Terraform Generation and Infrastructure Scaffolding
The tool also generates Terraform configurations based on the structured architecture graph. Rather than writing HCL (HashiCorp Configuration Language) manually, the system parses the JSON representation of the visual architecture and maps infrastructure components such as Amazon VPCs, subnets, and AWS Fargate services directly into Terraform resources.
The current state of the architecture diagram is incorporated into a specialized infrastructure-generation prompt to ensure that networking rules, security groups, and resource dependencies remain aligned with the visual topology.
The generated Terraform configurations are intentionally designed as foundational blueprints rather than production-ready deployments. Each generated file includes guidance indicating that the output is intended for educational, testing, and early-stage architecture planning purposes.
This approach helps accelerate infrastructure design workflows by providing a structured starting point that engineering teams can review, refine, secure, and adapt for production environments.
Key Features
To support practical modernization workflows, the tool focuses on three primary functional areas:
- Interactive Visual Mapping: Instead of relying on static diagrams, the tool generates an interactive architecture canvas where infrastructure components and their relationships can be inspected visually. Users can review service properties, network segmentation, and the hierarchy between Amazon VPCs, subnets, and application services.
- Strategic Insights Table: The tool generates a migration insights table that compares legacy infrastructure components against their proposed AWS equivalents. For example, a legacy MySQL server may be mapped to Amazon RDS or Amazon Aurora, along with a recommended migration strategy such as Replatform or Refactor.
- Secure Session History: Architecture sessions are archived in Amazon S3 to support collaboration and iterative modernization planning. This allows generated architectures and migration plans to be revisited, shared with stakeholders, and refined over time.
Case Study: Modernizing a Monolithic Application
The following example illustrates how the tool analyzes and modernizes a typical legacy application environment.
Legacy Input: "We have a monolithic PHP application running on two physical Ubuntu servers behind a hardware load balancer. The data is stored in a local MySQL 5.7 instance. Files uploaded by users are kept on a shared NFS mount. Everything is sitting in a single flat network without clear isolation."
The Automatic Transformation
After processing the legacy infrastructure description, the AWS Cloud Migrator generates a proposed cloud-native architecture based on modern AWS design patterns. Rather than performing a direct infrastructure migration, the generated architecture restructures the environment into segmented and managed AWS services. Key modernization changes include:
- Virtual Private Cloud (VPC): The architecture introduces a dedicated VPC to establish a clean network perimeter, labeled as aws_vpc in the diagram.
- Public and Private Subnet Segmentation: Internet-facing components such as the External ALB are placed within the Public Subnet (DMZ), while internal resources including the App Service, Aurora Database, and EFS File Storage are isolated within the Private Subnet (App/Data).
- Serverless and Managed Services: The generated architecture proposes modern AWS services such as Amazon ECS with AWS Fargate, Amazon Aurora, and Amazon EFS to reduce infrastructure management overhead and simplify application operations.

Screenshot of the Architecture Diagram Generated by the Tool
Validating and Refining the Design
What if the generated architecture does not align with specific application or organizational requirements? For example, a workload may require Amazon RDS for MySQL instead of Amazon Aurora due to licensing constraints, operational preferences, or compatibility considerations.
AWS Cloud Migrator supports iterative refinement through the Refine Architecture Chat feature. Architecture modifications can be requested directly through natural language prompts. For example:
"Replace the Aurora Database with a standard Amazon RDS for MySQL instance."
When a refinement request is submitted, the backend reconstructs the JSON architecture model, updates the corresponding diagram components in real time, and regenerates the associated Terraform blueprint.
This ability to “talk” to the architectural canvas transforms the tool from a static generator into an interactive modernization workspace, allowing the generated architecture, infrastructure model, and visualization layer to evolve together throughout the modernization process.

Screenshot of the Updated Architecture Generated through the Refine Architecture Chat feature
Migration Insights and Strategy
A successful modernization effort requires more than a generated architecture diagram. Migration planning also involves evaluating service compatibility, operational complexity, and modernization approaches for each infrastructure component.
To support this process, the AWS Cloud Migrator includes a dedicated Migration Insights panel that analyzes legacy infrastructure components and assigns recommended migration strategies such as Refactor, Replatform, or Retain.
One of the most useful aspects of this feature is the Alternative / Note column, which provides context-aware recommendations based on workload characteristics and application requirements. For example, while AWS Fargate may be recommended for containerized workloads, AWS App Runner may also be suggested for lightweight API services with simpler operational requirements.
Similarly, Amazon S3 may be recommended as an alternative to Amazon EFS when the workload primarily requires object storage rather than a shared file system. This allows engineering teams to evaluate multiple modernization paths and select services that best align with operational, architectural, and cost requirements.

Screenshot Showing the Migration Insights Panel Within the AWS Cloud Migrator
Future Roadmap: Areas for Growth
While the current version of the AWS Cloud Migrator provides a strong starting point, there are several key areas we plan to develop to move closer to a production-ready assistant:
- Large-Scale Doc Processing: Future iterations of the tool will focus on improving the ability to process large documentation sets and enterprise architecture references. This includes support for ingesting PDFs, wiki exports, and other structured documentation sources to help analyze complex legacy environments with greater contextual awareness.
- Continuous LLM Optimization: As generative AI models continue to evolve, ongoing improvements to model selection, prompt engineering, and Amazon Bedrock integration will remain an important area of focus. This includes supporting newer foundation models with larger context windows and improved reasoning capabilities for complex infrastructure relationships and dependency mapping.
- Deep Architectural Validation: Additional validation logic could further improve support for enterprise-scale infrastructure modernization scenarios. Examples include Multi-Region architectures, Transit Gateway topologies, hybrid networking patterns, and high-availability infrastructure requirements.
Conclusion
The AWS Cloud Migrator is designed to support infrastructure architects and engineering teams throughout the modernization process rather than replace architectural decision-making. By reducing the time required to transform legacy infrastructure descriptions into visual architectures and Terraform blueprints, the tool allows teams to focus more on architecture validation, optimization, and modernization strategy.
Even as an experimental prototype, the AWS Cloud Migrator demonstrates how generative AI and Amazon Bedrock can help simplify early-stage modernization workflows by converting legacy infrastructure descriptions into structured architecture models, migration insights, and deployable infrastructure foundations.
Related Posts

A Comprehensive Guide to AWS Migration

End-to-End Multimodal Video Search on AWS with Bedrock and OpenSearch
Building a multimodal video search engine on AWS using Amazon Bedrock embeddings and OpenSearch hybrid retrieval.
-900x506.jpg%3F2026-06-03T12%253A57%253A11.603Z&w=3840&q=85)
Giving AI the Keys: Controlling a Tesla with Amazon Bedrock AgentCore
How AWS Bedrock AgentCore securely connects AI agents to Tesla vehicle controls using MCP, Lambda, ECS, Cognito, and private networking.
