Using AI agents with DMS Schema Conversion
You can use AI agents to drive DMS Schema Conversion workflows through the AWS API. An AI agent is a software tool that uses large language models to understand natural language instructions and automate tasks. When connected to the AWS MCP server, an AI agent can create migration projects, browse your source database metadata tree, convert schemas, generate assessment reports, export results, and explain various aspects of the service. You control these operations through natural language prompts.
To improve the agent's accuracy and efficiency with DMS Schema Conversion, you can install the AWS DMS Schema Conversion skill. The skill provides DMS Schema Conversion-specific context including API patterns, system schema exclusions, operation sequencing, and service best practices.
Important
The skill contains instructions that prevent common errors that AI agents make when using DMS Schema Conversion and reduce trial-and-error loops, which helps decrease token usage and increase the speed of achieving the desired goal. We strongly recommend installing it before you start.
This topic shows how to install the skill, and provides examples of common DMS Schema Conversion workflows that you can run through an AI agent.
Prerequisites
Before you begin, make sure you have the following prerequisites. This guide assumes familiarity with AWS DMS and command-line interfaces.
-
An AI agent — An AI coding agent that supports the Model Context Protocol (MCP), such as Kiro CLI
, Claude Code , or Cursor . -
AWS MCP server — Configure the AWS MCP server in your agent so it can make AWS API calls. For more information, see Setting up the AWS MCP Server in the AWS Agent Toolkit User Guide.
-
AWS credentials — The agent needs AWS credentials with permissions to call AWS DMS APIs. Configure credentials using the AWS CLI. For more information about required permissions, see IAM permissions needed to use AWS DMS.
Note
If you already have a migration project configured in DMS Schema Conversion, the agent can work with it immediately. Otherwise, the agent can create one for you. For more information, see Working with data providers, instance profiles, and migration projects in AWS DMS.
Installing the AWS DMS Schema Conversion skill
A skill is a curated package of instructions and reference materials that helps your AI agent complete DMS Schema Conversion tasks effectively. The AWS DMS Schema Conversion skill contains API patterns, system schema exclusions, operation sequencing rules, and service best practices. With this skill, the agent makes fewer errors and requires less back-and-forth to complete DMS Schema Conversion operations.
Choose one of the following methods to install the skill.
After the skill loads successfully, you see an action menu with available schema conversion actions.
Best practices
Follow these recommendations to get the best results when using AI agents with DMS Schema Conversion.
-
Browse before converting — Use the agent to explore the metadata tree before you start converting schemas. This helps you understand the scope of the migration and identify which schemas to convert.
-
Convert one schema at a time — For large databases, convert schemas individually rather than all at once. This makes it easier to review the converted code and address action items incrementally.
-
Skip system schemas — Do not convert system databases or system schemas. They contain engine-internal objects that produce large numbers of unconvertible action items.
-
Review converted SQL before applying — Export the converted code as SQL scripts and review it before applying to your target database, especially for code objects.
-
Enable generative AI-assisted conversion — Enable generative AI-assisted conversion to improve the conversion rate for code objects. Generative AI-assisted conversion uses machine learning to convert objects that the rule-based converter cannot handle automatically. For more information, see Converting database objects with generative AI.
-
Use the assessment report — After conversion or assessment, generate an assessment report to get a summary of conversion results and remaining manual work. For more information, see Creating database migration assessment reports with DMS Schema Conversion.
Examples
The following examples show common DMS Schema Conversion workflows that you can run through an AI agent after loading the skill.
In this example, you use an AI agent to create a migration project for converting a Microsoft SQL Server database to Amazon Aurora PostgreSQL. The agent creates the required AWS DMS resources and links them together.
The following prompt instructs the agent to create a migration project:
I want to migrate my SQL Server database to Aurora PostgreSQL using DMS Schema Conversion. The source database is on an EC2 instance at 10.0.1.50, port 1433, database name "AdventureWorks". The credentials are stored in Secrets Manager under "mydb-source-credentials". Create a migration project for me.
The agent creates a source data provider, a target data provider, an instance profile, and the migration project that links them together. If you don't have a target database yet, the agent creates a virtual target data provider so you can convert and export schemas as SQL scripts. The agent also creates required IAM roles and S3 buckets, and checks network configuration.
After the agent creates the migration project, you can browse the source database metadata, assess or convert schemas, and export results.
You can use the agent to explore your source database structure. The agent navigates the metadata tree hierarchically, listing databases, schemas, tables, stored procedures, and other objects.
Show me the databases and schemas in my source database.
The agent imports the source metadata if it has not been imported yet, then navigates the metadata tree using the AWS DMS API. You can drill deeper into specific schemas:
Show me the stored procedures in the AdventureWorks.dbo schema.
After you browse the metadata tree, you can use the agent to assess or convert schemas and export the results.
Convert the AdventureWorks.dbo schema to Aurora PostgreSQL and export the converted SQL scripts.
The agent converts the schema objects and exports the converted SQL scripts to the S3 bucket. Each conversion and export operation runs asynchronously, and the agent polls for completion before starting the next operation. After conversion, the agent generates an assessment report.
The assessment report includes a summary of converted objects, action items for objects that require manual changes, and effort estimates. You can also ask the agent to explain the meaning of specific action items and provide guidance on how to resolve them.
Some DMS Schema Conversion operations, such as schema conversion, metadata import, and assessment, run asynchronously and can take time. While the agent polls for completion, you might want to ask questions, get clarifications, or give additional instructions without interrupting the workflow.
The following approaches let you interact with the agent during a long-running operation. Choose a method based on your agent's capabilities.