REVBLOG 1301 1 1
October 2026: This post was reviewed and updated for accuracy.
Scaling cloud migrations with agentic AI on Amazon Bedrock AgentCore raises a practical question. Which parts of a large migration program belong to a managed service, and which parts need custom automation? One enterprise program answered that question across 300+ applications and a fixed fiscal year deadline. The four-agent pattern in this post reduced infrastructure as code (IaC) development time from 3 to 4 weeks per application to minutes, based on internal project tracking data.
This pattern runs alongside AWS Transform rather than in place of it, as a hybrid that adds custom agents where your program requires them. AWS Transform covers the migration and modernization work, and AWS Database Migration Service (AWS DMS) covers the database tier. The agents in this post attach to those services and carry one further requirement: sources and destinations reached through Model Context Protocol (MCP) tools that your organization builds and maintains.
AWS Professional Services builds a suite of purpose-built AI agents for programs with that requirement. The agents use the Strands Agents SDK and run on Amazon Bedrock AgentCore, a platform to build, connect, and optimize agents at scale, with any framework or model. Each agent reaches its sources and destinations through MCP tools exposed by AgentCore Gateway.
In this post, you explore the architecture of a four-agent pattern for MCP-connected environments. You also see the code that defines an agent, connects it to its tools, and applies responsible AI controls. The pattern includes four agents:
To follow along, you need an AWS account with access to Amazon Bedrock AgentCore and to Amazon Bedrock foundation models. You also need familiarity with the Strands Agents SDK and MCP server patterns, plus the IaC tooling used by your organization. Confirm first that an AWS managed service does not already cover your migration path.
AWS Transform covers migration and modernization for server, network, mainframe, .NET, and application code workloads as a managed service, and AWS DMS covers databases. This pattern adds agents for the requirements that stay specific to your organization.
On the program described here, three conditions held together.
This pattern uses four purpose-built agents. The architecture attaches to a migration program at three points: the systems holding migration inputs, IaC composition, and operations after cutover. The pattern applies security at each of those points. The following diagram shows how the agents, tools, and AWS services connect.
Figure 1: How the agents connect across the migration and operations journeys through Model Context Protocol tool calling
The pattern organizes agents into two journeys. The migration journey agents handle discovery through deployment. The operations journey agent handles post-migration monitoring.
Migration journey agents:
Operations journey agents:
AWS managed services carry the migration and complement the custom agents:
This section describes how the framework components interact at runtime.
Each agent is a Strands agent, defined by a foundation model, a system prompt, and a set of tools. Amazon Bedrock AgentCore runtime hosts them in a serverless environment with session isolation and multi-agent orchestration. Amazon Bedrock foundation models power the reasoning that interprets documents, generates code, and drives multi-step workflows. For model availability by AWS Region, refer to Supported foundation models in Amazon Bedrock.
Each agent calls MCP tools scoped to its function through AgentCore Gateway, a capability of Amazon Bedrock AgentCore, which converts your APIs, AWS Lambda functions, and existing services into MCP-compatible tools. AgentCore Identity, a capability of Amazon Bedrock AgentCore, authenticates each call through scoped AWS Identity and Access Management (IAM) roles and your identity provider.
Amazon Bedrock AgentCore memory stores agent session state and shared context. Agents use this shared context to persist outputs and track migration progress across over 300 applications. When the Intake Agent completes discovery, it writes the target architecture and dependency mappings to AgentCore memory. The IaC Agent reads this shared context to begin code generation without manual handoff.
The following Python example defines the IaC Agent and prepares it for Amazon Bedrock AgentCore runtime. The agent reaches your MCP tools through AgentCore Gateway, and it calls a foundation model through Amazon Bedrock with an Amazon Bedrock Guardrails policy attached.
The entrypoint returns the generated IaC together with the policy set version that shaped it, so a reviewer traces the output back to a signed-off standard. AgentCore Runtime handles session isolation and scaling. For deployable examples, see the Amazon Bedrock AgentCore samples repository and the Strands Agents samples repository on GitHub. For the deployment steps, refer to Getting started with AgentCore runtime.
The Intake Agent reads the migration inputs that live in your document and collaboration systems. On this program, those systems were reachable through MCP tools the delivery team built and maintained.
The agent ingests architecture documentation, application inventory lists, intake questionnaires, and dependency records through those tools. It then produces a target AWS architecture with a recommended migration pattern, resource sizing specifications, and a compliance validation report.
The output feeds directly into the IaC Agent, creating an automated handoff from intake to infrastructure provisioning.
AWS Professional Services deployed the IaC Agent first in the portfolio, and it delivers the most immediately measurable impact. It generates IaC code adhering to your security best practices and standards.
The agent workflow proceeds through five steps:
Step 1: Ingest the steering document. The agent reads the steering document from the wave team. It extracts deployment scope, compliance constraints, and Security Office-approved wave-specific overrides.
Step 2: Interpret the target state architecture diagram. Using the Intake Agent’s output, the IaC Agent identifies infrastructure components, their relationships, and dependencies.
Step 3: Generate IaC. Based on this interpretation, the agent generates IaC using your defined and established patterns. It populates configurations with wave-specific parameters and configures remote state management. It then applies mandatory tagging and adds monitoring configurations required by organizational standards.
Step 4: Validate through Policy in Amazon Bedrock AgentCore. Before execution, Policy in AgentCore evaluates each tool call against Cedar rules. It calculates the scope of potential change, checks dependency conflicts with concurrent waves, and confirms compliance window validity.
Step 5: Execute and report. The centralized execution plane triggers the IaC, monitors deployment, and reports outcomes through AgentCore Observability, a capability of Amazon Bedrock AgentCore. Post-deployment validation runs automatically and compliance metrics update in real time.
Each action passes through custom MCP tools exposed by Amazon Bedrock AgentCore Gateway and governed by AgentCore Identity and Policy in AgentCore. AgentCore Identity authenticates each agent action through scoped IAM roles with least-privilege access. The framework validates inputs against defined schemas and rejects malformed inputs at the boundary.
No credentials or sensitive values pass through agent context, because AgentCore Identity resolves secrets at runtime from a centralized credential provider. AgentCore Observability and AWS CloudTrail write each agent action to an immutable, centralized audit trail. Policy in AgentCore enforces Cedar rules that help prevent a single operation from affecting more than a defined threshold.
The security office curates the policy set, not the agent. A versioned document holds each rule, the resource types it covers, a machine-checkable assertion, and the approval record. The following example shows three policies and one wave exception.
An AWS Lambda function serves that document, and AgentCore Gateway exposes the function as an MCP tool named get_policies. The IaC Agent requests only the policies in scope for the resource types in the wave it generates.
The response carries the policy set version, so generated code records which rules produced it and a reviewer traces a resource back to a signed-off standard. Waived policies travel in their own field rather than disappearing, and the compliance report lists them for the wave. Each exception carries an expiry date, so a lapsed waiver stops applying without manual cleanup.
Two policy layers operate here, and they answer different questions. AgentCore Policy evaluates Cedar rules to decide whether an agent calls a tool at all. The curated policy set decides what the generated infrastructure satisfies.
The IaC Agent generates infrastructure code based on your defined and established patterns. These patterns encode organizational standards into reusable constructs. They include network configurations, security group rules, IAM roles, Amazon CloudWatch alarms, Amazon Elastic Compute Cloud (Amazon EC2) configurations, Amazon Virtual Private Cloud (Amazon VPC) layouts, and mandatory tagging.
This approach provides consistency across waves, speed for wave teams who don’t write infrastructure code from scratch, and governance where security updates propagate to consumers on their next deployment cycle.
The agent produces IaC code, automated test cases, compliance reports, and deployment runbooks for each application.
The IaC Agent pushes generated code directly to your code repository (such as AWS CodeCommit, GitLab, or Bitbucket). From there, it enters your existing review and deployment pipeline without requiring changes to your existing toolchain.
A 300+ application portfolio needs status reporting, progress tracking, follow-up actions, and well-architected validation. On this program, that work ran inside the customer’s own Jira, Confluence, and Webex. Performing it by hand creates significant overhead for project managers and delivery leads.
The Migration Intelligence and Governance Agent addresses this with automated, on-demand intelligence and governance across the portfolio. It aggregates data from three sources through AgentCore Gateway. Jira provides sprint progress and impediments. Confluence provides architecture documentation and runbooks. Webex provides meeting notes and action items.
The agent provides well-architected assessments across migrated workloads, compliance and governance validation, and architecture pattern adherence tracking.
Automated actions include updating Confluence pages with latest migration status, creating Jira tasks for identified action items, and generating ServiceNow tickets for escalations. These actions require explicit human approval before execution. This approval-gated architecture is a core design principle across the four agents. Agents support human decision-making rather than replacing it.
On-demand reporting across the 300+ application portfolio replaces manual aggregation, based on internal project tracking data. Your results might vary based on portfolio size and tool integrations.
The SRE Agent covers the phase after handover. The migration services complete at cutover. After applications run on AWS, the SRE Agent shifts the team from reactive response to proactive improvement.
The agent monitors Amazon CloudWatch metrics, application performance data, and historical patterns. It raises alerts before issues affect production. The agent also publishes automated remediation playbooks for common failure patterns and recommends efficiency improvements.
Target areas (with human-in-the-loop approval) include database cluster right-sizing, performance tuning, storage tiering, and compute scaling and efficiency improvements.
The SRE Agent extends the pattern past migration. Applications don’t land on AWS and stop there. They continuously improve over time.
Alongside the custom AI agents, two AWS managed services handle the data and application modernization, server and network migration layer.
DMS Schema Conversion with generative AI reduces manual schema mapping effort. It converts code objects that rules-based conversion leaves unfinished, such as stored procedures, functions, and triggers. This capability is generally available in a subset of AWS Regions, so confirm Region support during wave planning. AWS DMS then shortens the cutover window with automated migration tasks. The service integrates directly into the agent pipeline. The IaC Agent provisions target infrastructure, then AWS DMS migrates the data.
AWS Transform covers the server, network, and code layers of the same program. The AWS Transform User Guide lists the current capabilities by workload type.
This architecture embeds security from the start, not as an afterthought, applying it at each phase of the migration lifecycle. Key controls across the agent suite:
This approach aligns with the AWS shared responsibility model. AWS provides security of the underlying infrastructure, while you’re responsible for security in the cloud. The agents automate your configuration responsibilities while maintaining human oversight for approval decisions.
In this implementation, the pattern maintained enterprise security standards across the over 300 application portfolio at speeds manual processes could not match. Your results might vary based on your security requirements and organizational standards.
Across the migration program, this framework delivered the following results. These metrics reflect this specific implementation. Your results might vary based on application complexity, team size, and organizational requirements.
Running this pattern adds cost in a few predictable places. Foundation model tokens usually dominate, because intake and IaC generation push documents, policies, and architecture context through a model and return generated code. Amazon Bedrock AgentCore bills on consumption. Runtime charges per second for the CPU and memory a session uses, and CPU scales to zero while an agent waits on a model response or a human approval. Gateway, Memory, Policy, and Guardrails each bill per unit of use, and Observability telemetry bills at Amazon CloudWatch rates.
Across a 300+ application portfolio the agents run for the length of the migration program rather than as a single job, so treat this as a running cost that tracks wave activity. Token volume follows document size and tool-call count more than application count, so a pilot wave gives you a per-application baseline. On the AWS Transform side, the assessment and the migration agents for virtualized, Windows, and mainframe workloads are available at no cost. The resources a migration creates bill normally, and custom transformations are priced per agent minute. For current rates, refer to Amazon Bedrock pricing, Amazon Bedrock AgentCore pricing, AWS Transform pricing, Amazon CloudWatch pricing, and the AWS Pricing Calculator.
To avoid ongoing charges after you finish testing the framework, remove the resources that you created:
Confirm in the Amazon Bedrock AgentCore console that no agent sessions remain active.
Migrating 300+ applications to AWS on an aggressive timeline needs more than added engineers. Managed services carry most of that work. Where a requirement falls outside them, an agent pattern can close the gap while humans keep decisions, approvals, and strategy.
This pattern delivered measurable results on one program whose sources and destinations sat behind MCP tools. Purpose-built Strands agents addressed those specific requirements, Amazon Bedrock AgentCore applied security structurally, and human-in-the-loop design kept automation supporting decision-making rather than replacing it. Use AWS Transform and AWS DMS for the migration, and run these agents with them where MCP-connected sources and destinations call for it.
Based on your use case, consider these paths:
To explore the services used in this post:
For background on the services and SDKs used here, read these AWS posts:
Control every pixel. Make precise multi-turn edits without changing any other pixel. Lay out the…
In this article, you will learn how to add a lightweight temporal reasoning layer to…
Chain Visualization: Reading the Trace Waterfall The spans from the last section don't mean much…
Recent autonomous machine learning engineering (MLE) agents have made significant progress on public leaderboards. Often…
Asking AI companies to self-regulate is a great way to pretend like you’ve accomplished something.
A proposed qubit made with superfluid helium could cut quantum computing error rates by around…