Getting started with Migration Assistant for Amazon OpenSearch Service: AI-assisted and manual modes
In this post, you learn what you need before you start with Migration Assistant for Amazon OpenSearch Service, how to deploy it in AI-assisted mode or with the manual Workflow CLI, and how to run and validate a first pilot migration.
OpenSearch is an open-source software suite for search, analytics, security monitoring, and observability applications, licensed under the Apache License V2.0. Amazon OpenSearch Service is a fully managed service that makes it easy to deploy, scale, and operate OpenSearch in the AWS Cloud. Teams that run self-managed Elasticsearch, OpenSearch, or Apache Solr move to OpenSearch Service for managed operations and current OpenSearch versions. Migration Assistant for Amazon OpenSearch Service is an AWS solution that moves metadata, historical data, and live traffic from those clusters to OpenSearch Service domains and Amazon OpenSearch Serverless NextGen collections.
This post is a starting point. It covers the building blocks of Migration Assistant, the two ways to operate it, the prerequisites, deployment, and a first pilot migration.
What Migration Assistant does
Migration Assistant supports Elasticsearch 1.x through 8.x, OpenSearch 1.x through 3.x, and Apache Solr 6.x through 9.x as sources. The supported targets depend on the source version, so check the supported migration paths for your source before you plan. Elasticsearch 1.x and 2.x sources support backfill only, without live traffic capture.
Migration Assistant 3.0 runs on Amazon Elastic Kubernetes Service (Amazon EKS) and runs each migration as a workflow of Kubernetes-managed workloads. Four components do the work:
- Metadata migration copies index settings, mappings, index templates, component templates, and aliases to the target.
- Reindex-from-Snapshot (RFS) reads documents from a snapshot of the source in Amazon Simple Storage Service (Amazon S3) and bulk-indexes the documents into the target. RFS reads from Amazon S3, so RFS adds no read load to the source cluster.
- Capture Proxy sits in front of the source, forwards each request to the source, and records each request to Apache Kafka.
- Traffic Replayer replays the recorded requests against the target, so the target catches up with the source and you can compare responses.
Migration Assistant combines these components into three migration patterns. Backfill only migrates a snapshot and fits workloads that can pause writes briefly at cutover. Capture and replay only fits small datasets that live traffic alone can bring up to date. Backfill plus capture and replay gives a zero-downtime migration: capture starts first, the backfill moves historical data, and replay catches the target up before cutover.
Choosing AI-assisted mode or the manual Workflow CLI
Migration Assistant has two operating modes, and both run the same workflow engine on Amazon EKS.
In AI-assisted mode, you describe the migration in plain language and an AI coding agent does the operational work. The agent assesses the source, deploys the infrastructure, generates the workflow configuration, submits and monitors the workflow, and troubleshoots failures. Supported agents include Kiro, Claude Code, Codex, and Cursor. AI-assisted mode suits a first migration, a proof of concept, or a team that wants guidance through an unfamiliar tool.
In manual mode, you run the Workflow CLI yourself from the Migration Console pod. You write the workflow configuration in JavaScript Object Notation (JSON), submit the workflow, and approve each gate. Manual mode suits teams that want direct control over every setting, repeatable runs in automation, or a change-controlled production migration.
The two modes aren't exclusive. The agent runs the same Workflow CLI underneath, so you can start in AI-assisted mode, then open the Migration Console and inspect or adjust the workflow by hand at any point.
Before you start
Four things must be in place before your first migration, whichever mode you choose.
- AWS account and tools. You need permissions for AWS CloudFormation, Amazon EKS, AWS Identity and Access Management (IAM), Amazon Elastic Compute Cloud (Amazon EC2), Amazon Elastic Container Registry (Amazon ECR), Amazon S3, Amazon CloudWatch, and AWS Secrets Manager. AWS CloudShell comes with the AWS Command Line Interface (AWS CLI),
kubectl, and Helm installed. A local terminal works too, with AWS CLI version 2,kubectl, and Helm 3.
- Network paths. The Amazon EKS cluster must reach the source cluster and the target. For a self-managed source in a virtual private cloud (VPC), deploy Migration Assistant into the same VPC, or connect the VPCs, and open the security groups for the source's HTTP port.
- A snapshot repository on the source. Backfill reads a snapshot in Amazon S3. For Elasticsearch, install the
repository-s3plugin on every node, grant the nodes' IAM role access to the snapshot bucket, and register and verify a repository. Migration Assistant can create the snapshot, or it can use a snapshot that already exists.
- Access on the target. The migration jobs sign requests to an OpenSearch Service domain with AWS Signature Version 4 (SigV4), using an IAM role named
<eks-cluster-name>-migrations-role. If the domain uses fine-grained access control, map that role to a role with write access for the duration of the migration.
Also review the cost guidance. You pay for the Amazon EKS cluster, Kafka storage, and other resources while Migration Assistant runs, so remove the deployment when the migration ends.
Deploying Migration Assistant
Deploying in AI-assisted mode
Install the Migration Assistant CLI, choose Agent mode when the installer prompts you, and launch the agent.
curl -fsSL https://solutions-reference.s3.amazonaws.com/migration-assistant-for-amazon-opensearch-service/latest/install.sh | bashmigration-assistant agent
The agent confirms three things before it changes anything: the AWS account and role, the AWS Region, and a stage name that labels the deployment. Then describe your goal. For example:
I want to migrate a self-managed Elasticsearch 7.10 cluster on Amazon EC2 in us-east-1to an Amazon OpenSearch Service domain with zero downtime. Deploy into my existing VPC.Do not modify my source cluster, and ask me before any delete command.
By default, the agent shows each command that changes AWS, Kubernetes, or cluster state before running it, stops and presents options when a step fails, treats the source as read-only, and keeps the workflow's approval gates. The agent can still make mistakes, so read each proposed command and check the account, Region, and endpoints before you approve.
Deploying with the bootstrap script
For manual deployment, download the bootstrap script and deploy into a new VPC or an existing one. Pin a release with
--version so that repeated deployments use the same artifacts.
curl -sL -o aws-bootstrap.sh \ "https://solutions-reference.s3.amazonaws.com/migration-assistant-for-amazon-opensearch-service/latest/aws-bootstrap.sh" \ && chmod +x aws-bootstrap.sh
./aws-bootstrap.sh \ --deploy-import-vpc-cfn \ --stack-name MA \ --stage dev \ --vpc-id <VPC_ID> \ --subnet-ids <SUBNET_1>,<SUBNET_2> \ --region <REGION> \ --version <MIGRATION_ASSISTANT_VERSION>
The script deploys the CloudFormation stack, creates the Amazon EKS cluster, sets up IAM roles through EKS Pod Identity, installs the Helm chart, and creates a default S3 bucket for migration artifacts. For subnets without internet access, add
--create-vpc-endpoints , and the script mirrors images to Amazon ECR and creates the VPC endpoints the cluster needs. Verify the deployment and open a shell in the Migration Console.
aws eks update-kubeconfig --region <REGION> --name migration-eks-cluster-<STAGE>-<REGION>kubectl get pods -n makubectl exec -it migration-console-0 -n ma -- /bin/bashRunning your first migration
Start every migration with a pilot on a few small indices. A pilot surfaces mapping, authentication, and throughput problems before they affect the full dataset. The following table shows the same pilot steps in both modes.
Step | AI-assisted mode (example prompt) | Manual mode (Migration Console) |
|---|---|---|
Load a starting configuration | "Set up a backfill from my source to my target." | workflow configure sample --load |
Describe source and target | "My source is Elasticsearch 7.10 at …, with basic auth." | workflow configure edit |
Store credentials | The agent prompts you for credentials. | workflow configure credentials create source-credentials |
Check connectivity | "Check that you can reach both clusters." | console clusters connection-check |
Run a pilot | "Run a pilot on the orders-2024-01 index only." | workflow submit , then workflow manage |
Review and approve gates | The agent shows the metadata evaluation and asks to proceed. | workflow approve step 'evaluatemetadata.*' |
Validate | "Compare document counts between source and target." | console clusters cat-indices --refresh |
In manual mode, a minimal pilot configuration declares the source and its snapshot repository, the target with SigV4 authentication, and an
indexAllowlist that limits the run to the pilot indices.
{ "sourceClusters": { "source": { "endpoint": "https://<SOURCE_ENDPOINT>:9200", "version": "ES 7.10.2", "authConfig": { "basic": { "secretName": "source-credentials" } }, "snapshotInfo": { "repos": { "default": { "awsRegion": "<REGION>", "s3RepoPathUri": "s3://<SNAPSHOT_BUCKET>/migration-snapshots" } }, "snapshots": { "pilot": { "config": { "createSnapshotConfig": {} }, "repoName": "default" } } } } }, "targetClusters": { "target": { "endpoint": "https://<DOMAIN_ENDPOINT>", "authConfig": { "sigv4": { "region": "<REGION>", "service": "es" } } } }, "snapshotMigrationConfigs": [ { "fromSource": "source", "toTarget": "target", "perSnapshotConfig": { "pilot": [ { "metadataMigrationConfig": { "skipEvaluateApproval": false, "skipMigrateApproval": false }, "documentBackfillConfig": { "podReplicas": 4, "indexAllowlist": ["orders-2024-01"] } } ] } } ]}
Metadata migration runs as two gated steps. The
evaluatemetadata step previews what Migration Assistant will create on the target, and the migratemetadata step applies the changes. Review the evaluation with workflow show before you approve each gate, in either mode. After the pilot validates, widen the indexAllowlist to the full index set (an empty list includes all non-system indices) and run again. To speed up the full backfill, raise podReplicas . Each RFS worker migrates one shard at a time, so throughput grows with workers up to the number of shards, as long as the target keeps up.For a zero-downtime migration, add a
traffic section that defines a Capture Proxy and a Traffic Replayer, reroute clients to the proxy, and verify that capture works before the snapshot runs. The Workflow CLI guide and the playbooks walk through capture, replay, and cutover in detail.Troubleshooting and cleaning up
When a step fails in AI-assisted mode, the agent collects pod status, logs, and events with read-only commands, describes the error, and asks how to proceed. In manual mode, start with
workflow status and workflow log all , and use workflow log resource <RESOURCE> to read the logs of one component. workflow submit replaces an earlier workflow with the same name, so you don't need to clean up between pilot runs.After cutover, keep the source cluster available for a rollback window, typically 24–72 hours. Then remove the mapping that grants the migration role access to the target, and uninstall Migration Assistant to stop the charges for the Amazon EKS cluster and Kafka storage.
Customer migrations with Migration Assistant
The following AWS Big Data Blog posts describe production migrations that used Migration Assistant:
- How Octus achieved 85% infrastructure cost reduction with zero downtime migration to Amazon OpenSearch Service . Octus moved Elasticsearch 7.17 workloads from Elastic Cloud to OpenSearch Service with metadata migration, Reindex-from-Snapshot, and Traffic Replayer, with no application downtime.
- How Autodesk migrated 2.3 billion documents to Amazon OpenSearch Service using Migration Assistant and intelligent routing . Autodesk split one Elasticsearch 7.1.1 domain into four OpenSearch 2.19 domains with the snapshot and reindex path, and completed the migration in about 6 hours.
For the internals of the backfill, see Accelerate your migration to Amazon OpenSearch Service with Reindexing-from-Snapshot .
Conclusion
In this post, you learned the four components of Migration Assistant, the three migration patterns, and the difference between AI-assisted mode and the manual Workflow CLI. You then prepared the prerequisites, deployed Migration Assistant in either mode, and ran a pilot migration with approval gates and validation. Start with a pilot in whichever mode fits your team, and widen the scope only after the pilot validates.
About the Author
Jagadish Kumar (Jag) is a Senior Solutions Architect at Amazon Web Services, focused on Amazon OpenSearch Service.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article