October 2026: This put up was reviewed and up to date for accuracy.
Scaling cloud migrations with agentic AI on Amazon Bedrock AgentCore raises a sensible query. Which elements of a big migration program belong to a managed service, and which elements want customized automation? One enterprise program answered that query throughout 300+ functions and a set fiscal yr deadline. The four-agent sample on this put up diminished infrastructure as code (IaC) growth time from 3 to 4 weeks per software to minutes, based mostly on inside undertaking monitoring knowledge.
This sample runs alongside AWS Rework fairly than instead of it, as a hybrid that provides customized brokers the place your program requires them. AWS Rework covers the migration and modernization work, and AWS Database Migration Service (AWS DMS) covers the database tier. The brokers on this put up connect to these companies and carry one additional requirement: sources and locations reached by Mannequin Context Protocol (MCP) instruments that your group builds and maintains.
AWS Skilled Providers builds a collection of purpose-built AI brokers for applications with that requirement. The brokers use the Strands Brokers SDK and run on Amazon Bedrock AgentCore, a platform to construct, join, and optimize brokers at scale, with any framework or mannequin. Every agent reaches its sources and locations by MCP instruments uncovered by AgentCore Gateway.
On this put up, you discover the structure of a four-agent sample for MCP-connected environments. You additionally see the code that defines an agent, connects it to its instruments, and applies accountable AI controls. The sample contains 4 brokers:
- The Consumption Agent, which reads migration inputs from doc and collaboration methods by MCP instruments.
- The IaC Agent, which generates IaC that composes your authorised inside modules.
- The Migration Intelligence and Governance Agent, which reviews and governs inside your individual program instruments.
- The Website Reliability Engineering (SRE) Agent for operations after cutover.
To observe alongside, you want an AWS account with entry to Amazon Bedrock AgentCore and to Amazon Bedrock basis fashions. You additionally want familiarity with the Strands Brokers SDK and MCP server patterns, plus the IaC tooling utilized by your group. Verify first that an AWS managed service doesn’t already cowl your migration path.
When this sample applies
AWS Rework covers migration and modernization for server, community, mainframe, .NET, and software code workloads as a managed service, and AWS DMS covers databases. This sample provides brokers for the necessities that keep particular to your group.
On this system described right here, three circumstances held collectively.
- MCP-connected sources and locations: The methods holding the migration inputs, and the methods receiving the outputs, had been reached by MCP instruments that the supply group constructed and maintained. They included an inside wiki holding safety requirements, a ticketing system, a collaboration platform, and an in-house provisioning API.
- Group-specific IaC composition: Generated infrastructure code needed to compose an inside module library that the safety workplace evaluations and approves. Writing that composition by hand took 3 to 4 weeks per software, which throughout a 300+ software portfolio interprets to years of engineering effort.
- Work persevering with previous cutover: Program scope included operations after handover, which sits outdoors the migration companies.
Structure overview
This sample makes use of 4 purpose-built brokers. The structure attaches to a migration program at three factors: the methods holding migration inputs, IaC composition, and operations after cutover. The sample applies safety at every of these factors. The next diagram exhibits how the brokers, instruments, and AWS companies join.
Determine 1: How the brokers join throughout the migration and operations journeys by Mannequin Context Protocol device calling
The sample organizes brokers into two journeys. The migration journey brokers deal with discovery by deployment. The operations journey agent handles post-migration monitoring.
Migration journey brokers:
- Consumption Agent (Section 1): Reads structure paperwork, questionnaires, and dependency data by MCP instruments, then defines goal state structure.
- IaC Agent (Section 2): Generates IaC that composes your authorised inside modules for every software.
- Migration Intelligence and Governance Agent: Offers automated portfolio reporting, well-architected assessments, and governance throughout Jira, Confluence, and Webex.
Operations journey brokers:
- SRE Agent (Section 3): Offers monitoring and automatic remediation after cutover.
AWS managed companies carry the migration and complement the customized brokers:
- AWS Database Migration Service (AWS DMS): Generative AI-assisted schema conversion and automatic cutover for database migration.
- AWS Rework: Discovery, wave planning, touchdown zone creation, community conversion, rehost or replatform execution, and modernization for mainframe, virtualized, and .NET workloads.
How the elements join
This part describes how the framework elements work together at runtime.
Every agent is a Strands agent, outlined by a basis mannequin, a system immediate, and a set of instruments. Amazon Bedrock AgentCore runtime hosts them in a serverless setting with session isolation and multi-agent orchestration. Amazon Bedrock basis fashions energy the reasoning that interprets paperwork, generates code, and drives multi-step workflows. For mannequin availability by AWS Area, confer with Supported basis fashions in Amazon Bedrock.
Every agent calls MCP instruments scoped to its operate by AgentCore Gateway, a functionality of Amazon Bedrock AgentCore, which converts your APIs, AWS Lambda capabilities, and current companies into MCP-compatible instruments. AgentCore Id, a functionality of Amazon Bedrock AgentCore, authenticates every name by scoped AWS Id and Entry Administration (IAM) roles and your identification supplier.
Amazon Bedrock AgentCore reminiscence shops agent session state and shared context. Brokers use this shared context to persist outputs and monitor migration progress throughout over 300 functions. When the Consumption Agent completes discovery, it writes the goal structure and dependency mappings to AgentCore reminiscence. The IaC Agent reads this shared context to start code era with out guide handoff.
Defining an agent in code
The next Python instance defines the IaC Agent and prepares it for Amazon Bedrock AgentCore runtime. The agent reaches your MCP instruments by AgentCore Gateway, and it calls a basis mannequin by Amazon Bedrock with an Amazon Bedrock Guardrails coverage connected.
The entrypoint returns the generated IaC along with the coverage set model that formed it, so a reviewer traces the output again to a signed-off customary. AgentCore Runtime handles session isolation and scaling. For deployable examples, see the Amazon Bedrock AgentCore samples repository and the Strands Brokers samples repository on GitHub. For the deployment steps, confer with Getting began with AgentCore runtime.
Section 1: Consumption Agent for automated discovery
The Consumption Agent reads the migration inputs that stay in your doc and collaboration methods. On this program, these methods had been reachable by MCP instruments the supply group constructed and maintained.
The agent ingests structure documentation, software stock lists, consumption questionnaires, and dependency data by these instruments. It then produces a goal AWS structure with a advisable migration sample, useful resource sizing specs, and a compliance validation report.
The output feeds instantly into the IaC Agent, creating an automatic handoff from consumption to infrastructure provisioning.
Section 2: IaC Agent for automated infrastructure code era
AWS Skilled Providers deployed the IaC Agent first within the portfolio, and it delivers probably the most instantly measurable influence. It generates IaC code adhering to your safety finest practices and requirements.
The way it works
The agent workflow proceeds by 5 steps:
Step 1: Ingest the steering doc. The agent reads the steering doc from the wave group. It extracts deployment scope, compliance constraints, and Safety Workplace-approved wave-specific overrides.
Step 2: Interpret the goal state structure diagram. Utilizing the Consumption Agent’s output, the IaC Agent identifies infrastructure elements, their relationships, and dependencies.
Step 3: Generate IaC. Based mostly on this interpretation, the agent generates IaC utilizing your outlined and established patterns. It populates configurations with wave-specific parameters and configures distant state administration. It then applies necessary tagging and provides monitoring configurations required by organizational requirements.
Step 4: Validate by Coverage in Amazon Bedrock AgentCore. Earlier than execution, Coverage in AgentCore evaluates every device name in opposition to Cedar guidelines. 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 airplane triggers the IaC, screens deployment, and reviews outcomes by AgentCore Observability, a functionality of Amazon Bedrock AgentCore. Publish-deployment validation runs mechanically and compliance metrics replace in actual time.
Customized MCP instruments: The safety basis
Every motion passes by customized MCP instruments uncovered by Amazon Bedrock AgentCore Gateway and ruled by AgentCore Id and Coverage in AgentCore. AgentCore Id authenticates every agent motion by scoped IAM roles with least-privilege entry. The framework validates inputs in opposition to outlined schemas and rejects malformed inputs on the boundary.
No credentials or delicate values cross by agent context, as a result of AgentCore Id resolves secrets and techniques at runtime from a centralized credential supplier. AgentCore Observability and AWS CloudTrail write every agent motion to an immutable, centralized audit path. Coverage in AgentCore enforces Cedar guidelines that assist stop a single operation from affecting greater than an outlined threshold.
Curated organizational insurance policies as MCP instruments
The safety workplace curates the coverage set, not the agent. A versioned doc holds every rule, the useful resource sorts it covers, a machine-checkable assertion, and the approval report. The next instance exhibits three insurance policies and one wave exception.
An AWS Lambda operate serves that doc, and AgentCore Gateway exposes the operate as an MCP device named get_policies. The IaC Agent requests solely the insurance policies in scope for the useful resource sorts within the wave it generates.
The response carries the coverage set model, so generated code data which guidelines produced it and a reviewer traces a useful resource again to a signed-off customary. Waived insurance policies journey in their very own discipline fairly than disappearing, and the compliance report lists them for the wave. Every exception carries an expiry date, so a lapsed waiver stops making use of with out guide cleanup.
Two coverage layers function right here, and so they reply completely different questions. AgentCore Coverage evaluates Cedar guidelines to resolve whether or not an agent calls a device in any respect. The curated coverage set decides what the generated infrastructure satisfies.
IaC era based mostly in your patterns
The IaC Agent generates infrastructure code based mostly in your outlined and established patterns. These patterns encode organizational requirements into reusable constructs. They embrace community configurations, safety group guidelines, IAM roles, Amazon CloudWatch alarms, Amazon Elastic Compute Cloud (Amazon EC2) configurations, Amazon Digital Non-public Cloud (Amazon VPC) layouts, and necessary tagging.
This method offers consistency throughout waves, pace for wave groups who don’t write infrastructure code from scratch, and governance the place safety updates propagate to shoppers on their subsequent deployment cycle.
Output artifacts
The agent produces IaC code, automated take a look at instances, compliance reviews, and deployment runbooks for every software.
The IaC Agent pushes generated code on to your code repository (resembling AWS CodeCommit, GitLab, or Bitbucket). From there, it enters your current overview and deployment pipeline with out requiring modifications to your current toolchain.
Migration Intelligence and Governance Agent: Portfolio-wide visibility
A 300+ software portfolio wants standing reporting, progress monitoring, follow-up actions, and well-architected validation. On this program, that work ran contained in the buyer’s personal Jira, Confluence, and Webex. Performing it by hand creates vital overhead for undertaking managers and supply leads.
The Migration Intelligence and Governance Agent addresses this with automated, on-demand intelligence and governance throughout the portfolio. It aggregates knowledge from three sources by AgentCore Gateway. Jira offers dash progress and impediments. Confluence offers structure documentation and runbooks. Webex offers assembly notes and motion gadgets.
The agent offers well-architected assessments throughout migrated workloads, compliance and governance validation, and structure sample adherence monitoring.
Automated actions embrace updating Confluence pages with newest migration standing, creating Jira duties for recognized motion gadgets, and producing ServiceNow tickets for escalations. These actions require specific human approval earlier than execution. This approval-gated structure is a core design precept throughout the 4 brokers. Brokers assist human decision-making fairly than changing it.
On-demand reporting throughout the 300+ software portfolio replaces guide aggregation, based mostly on inside undertaking monitoring knowledge. Your outcomes may differ based mostly on portfolio measurement and gear integrations.
Section 3: SRE Agent for proactive post-migration operations
The SRE Agent covers the section after handover. The migration companies full at cutover. After functions run on AWS, the SRE Agent shifts the group from reactive response to proactive enchancment.
The agent screens Amazon CloudWatch metrics, software efficiency knowledge, and historic patterns. It raises alerts earlier than points have an effect on manufacturing. The agent additionally publishes automated remediation playbooks for frequent failure patterns and recommends effectivity enhancements.
Goal areas (with human-in-the-loop approval) embrace database cluster right-sizing, efficiency tuning, storage tiering, and compute scaling and effectivity enhancements.
The SRE Agent extends the sample previous migration. Functions don’t land on AWS and cease there. They repeatedly enhance over time.
Information migration with AWS DMS
Alongside the customized AI brokers, two AWS managed companies deal with the info and software modernization, server and community migration layer.
DMS Schema Conversion with generative AI reduces guide schema mapping effort. It converts code objects that rules-based conversion leaves unfinished, resembling saved procedures, capabilities, and triggers. This functionality is usually accessible in a subset of AWS Areas, so verify Area assist throughout wave planning. AWS DMS then shortens the cutover window with automated migration duties. The service integrates instantly into the agent pipeline. The IaC Agent provisions goal infrastructure, then AWS DMS migrates the info.
AWS Rework covers the server, community, and code layers of the identical program. The AWS Rework Consumer Information lists the present capabilities by workload sort.
Safety and compliance: Embedded, not bolted on
This structure embeds safety from the beginning, not as an afterthought, making use of it at every section of the migration lifecycle. Key controls throughout the agent suite:
- Safety requirements enforcement: The IaC Agent pulls your safety workplace requirements instantly from Confluence and applies them throughout generated IaC utilizing customized MCP instruments.
- Touchdown zone validation: The framework validates generated infrastructure in opposition to the enterprise’s touchdown zone compliance necessities earlier than deployment.
- Human-in-the-loop approval gates: Automated actions throughout all brokers within the suite require specific human approval earlier than execution. No agent acts autonomously on manufacturing methods.
- AgentCore Gateway coordination: Amazon Bedrock AgentCore Gateway coordinates context and safety controls throughout brokers, sustaining constant coverage software all through the migration lifecycle.
- Steady integration and steady supply (CI/CD) integration: The framework integrates safety controls into the CI/CD pipeline, with automated take a look at instances generated alongside IaC to catch compliance points earlier than they attain manufacturing.
- Accountable AI controls on the inference layer: Amazon Bedrock Guardrails applies content material filters, denied matters, delicate data filters, and contextual grounding checks to every immediate and every mannequin response. An agent acts solely on output that clears the guardrail. Guardrail traces circulate into AgentCore Observability alongside the tool-call audit path.
This method aligns with the AWS shared accountability mannequin. AWS offers safety of the underlying infrastructure, whilst you’re chargeable for safety within the cloud. The brokers automate your configuration duties whereas sustaining human oversight for approval selections.
On this implementation, the sample maintained enterprise safety requirements throughout the over 300 software portfolio at speeds guide processes couldn’t match. Your outcomes may differ based mostly in your safety necessities and organizational requirements.
Measurable influence
Throughout the migration program, this framework delivered the next outcomes. These metrics replicate this particular implementation. Your outcomes may differ based mostly on software complexity, group measurement, and organizational necessities.
- IaC growth time diminished from weeks to minutes: from 3–4 weeks per software to minutes of automated era (based mostly on inside undertaking monitoring knowledge).
- Sample consistency utilized throughout waves: no wave can deviate from the authorised IaC patterns baseline.
- Safety compliance: verified mechanically at every deployment, with an entire audit path requiring zero guide effort.
- Structure-to-deployment constancy improved: the agent interprets the diagram, and the IaC realizes it as designed.
- On-demand portfolio reporting throughout over 300 functions with exact metrics and 0 guide aggregation.
- Wave group onboarding improved: groups add paperwork and the brokers produce the IaC and the reviews.
Value issues
Working this sample provides value in a couple of predictable locations. Basis mannequin tokens often dominate, as a result of consumption and IaC era push paperwork, insurance policies, and structure context by a mannequin and return generated code. Amazon Bedrock AgentCore payments on consumption. Runtime prices per second for the CPU and reminiscence a session makes use of, and CPU scales to zero whereas an agent waits on a mannequin response or a human approval. Gateway, Reminiscence, Coverage, and Guardrails every invoice per unit of use, and Observability telemetry payments at Amazon CloudWatch charges.
Throughout a 300+ software portfolio the brokers run for the size of the migration program fairly than as a single job, so deal with this as a working value that tracks wave exercise. Token quantity follows doc measurement and tool-call depend greater than software depend, so a pilot wave offers you a per-application baseline. On the AWS Rework facet, the evaluation and the migration brokers for virtualized, Home windows, and mainframe workloads can be found for free of charge. The sources a migration creates invoice usually, and customized transformations are priced per agent minute. For present charges, confer with Amazon Bedrock pricing, Amazon Bedrock AgentCore pricing, AWS Rework pricing, Amazon CloudWatch pricing, and the AWS Pricing Calculator.
Clear up sources
To keep away from ongoing prices after you end testing the framework, take away the sources that you simply created:
- Delete the brokers from AgentCore runtime, then take away the Gateway targets and the Gateway.
- Delete the AgentCore reminiscence sources that maintain session state and shared context.
- Delete the guardrail, the Coverage in AgentCore definitions, and the IAM roles created for the brokers.
- Delete the CloudWatch log teams that AgentCore Observability wrote to, should you not want the historical past.
- Delete any AWS DMS replication situations and endpoints provisioned for take a look at migrations.
Verify within the Amazon Bedrock AgentCore console that no agent periods stay lively.
Conclusion
Migrating 300+ functions to AWS on an aggressive timeline wants greater than added engineers. Managed companies carry most of that work. The place a requirement falls outdoors them, an agent sample can shut the hole whereas people maintain selections, approvals, and technique.
This sample delivered measurable outcomes on one program whose sources and locations sat behind MCP instruments. Objective-built Strands brokers addressed these particular necessities, Amazon Bedrock AgentCore utilized safety structurally, and human-in-the-loop design stored automation supporting decision-making fairly than changing it. Use AWS Rework and AWS DMS for the migration, and run these brokers with them the place MCP-connected sources and locations name for it.
Subsequent steps
Based mostly in your use case, take into account these paths:
- Planning a migration? Join AWS Rework to your favourite AI code companion and get began with server, community, and code migration and modernizations, and AWS DMS for database.
- Sources and locations behind MCP instruments? Consider this sample. See Amazon Bedrock AgentCore to learn to construct and deploy brokers.
- Inside module library to honor? Consider the IaC Agent. IaC growth time dropped from weeks to minutes in opposition to a guide baseline on this program.
- Governance inside your individual program instruments? Contemplate the Migration Intelligence and Governance Agent for standing reporting and well-architected assessments. Study extra about Amazon Bedrock AgentCore Reminiscence for agent state administration.
- Publish-migration? Discover the SRE Agent sample to shift from reactive operations to proactive enchancment. Use Amazon CloudWatch for monitoring and automatic alerting.
- Constructing your individual brokers? Begin with the Strands Brokers SDK and Amazon Bedrock AgentCore, utilizing MCP servers tailor-made to your migration bottlenecks. Open the Amazon Bedrock AgentCore console to get began, learn Deploying Strands Brokers to Amazon Bedrock AgentCore runtime.
To discover the companies used on this put up:
For background on the companies and SDKs used right here, learn these AWS posts:
In regards to the authors

