Rehost applications on Amazon EC2
You can rehost your custom Windows and Linux applications on Amazon EC2 using the Rehost applications on Amazon EC2 template.
Prerequisites
You must meet the following requirements to create a migration workflow using this template.
-
Verify that your applications are on a supported operating system. For more information, see Supported operating systems.
-
AWS Application Migration Service must be initialized by the IAM admin of the AWS account. For more information, see Application Migration Service initialization and permissions .
-
Complete the replication settings for AWS Application Migration Service. For more information, see Replication settings.
-
Provide credentials in the AWS Secrets Manager to install the AWS Replication Agent on your remote server.
-
Sign in to https://console.aws.amazon.com/secretsmanager/
. -
On the AWS Secrets Manager page, select Store a new secret.
-
For Secret type, select Other type of secret and enter the following keys.
Key Value access_key
access_key
of the credentialsecret_key
secret_key
of the credential -
Select Next and enter a name for the key pair beginning with
migrationhub-orchestrator-
.secretname123
Important
The Secret ID must begin with the prefix
migrationhub-orchestrator-
and must only be followed by an alphanumeric value. -
Select Next and then, select Store.
-
-
Create an IAM user and attach the AWSApplicationMigrationAgentPolicy policy.
-
Create an IAM role with the Amazon EC2 use case to run test scripts on migrated instances. Attach the AWSMigrationHubOrchestratorInstanceRolePolicy and AmazonSSMManagedInstanceCore policies to this role. Once the role is created, update the trust policy to include SSM (
ssm.amazonaws.com
). For more information on updating a trust policy, see Modifying a role trust policy (console). -
The IAM user running the AWS Application Migration Service must have permissions to perform the
startTest
andstartCutoverInstance
tasks. Create an IAM user and attach the AWSApplicationMigrationFullAccess, AWSApplicationMigrationEC2Access, and AmazonEC2FullAccess policies along with the following inline policy.{ "Effect": "Allow", "Action": [ "mgn:StartCutover", "mgn:StartTest" ], "Resource": "*" }, { "Effect": "Allow", "Action": "iam:PassRole", "Resource": "*", "Condition": { "StringEquals": { "iam:PassedToService": "ec2.amazonaws.com" } } }
Create a migration workflow
-
Go to https://console.aws.amazon.com/migrationhub/orchestrator/
, and select Create migration workflow. -
On Choose a workflow template page, select Rehost on Amazon EC2 using AWS Application Migration Service template.
-
Configure and submit your workflow to begin migration.
Note
You can customize the migration workflow once it has been created. For more information, see Migration workflows.
Details
Enter a name for your workflow. Optionally, you can enter a description and add tags. If you intend to run multiple migrations, we recommend adding tags to enhance searchability. For more information, see Tagging AWS resources.
Application
Select the application you want to migrate. If you do not see the application in the list,
you must define it in AWS Application Discovery Service
Define applications
Define applications by adding a data source and grouping the servers as applications.
Add data source
Get metadata about the source servers and applications that you want to migrate to AWS. You can use one of the following methods to collect the data.
-
Migration Hub import – Import information about your on-premises servers and applications into Migration Hub. For more information, see Migration Hub Import in the Application Discovery Service User Guide.
-
AWS Agentless Discovery Connector – The Discovery Connector is a VMware appliance that collects information about VMware virtual machines (VMs). For more information, see AWS Agentless Discovery Connector in the Application Discovery Service User Guide.
-
AWS Application Discovery Agent – The Discovery Agent is AWS software that you install on your on-premises servers and VMs to capture system information, as well as information about the network connections between systems. For more information, see AWS Application Discovery Agent in the Application Discovery Service User Guide.
Group servers
To use Migration Hub Orchestrator, you must group servers as applications.
-
In AWS Migration Hub console, select Discover, Servers.
-
In the servers list, select each server that you want to group into a new or existing application.
-
To create your application, or add to an existing one, choose Group as application.
-
In the Group as application dialog box, choose Group as a new application or Add to an existing application.
-
Select Group.
To view and edit your applications in the AWS Migration Hub console, go to Discover > Servers.
Target environment configuration
If you want to run test scripts on migrated instances, check the box for I want to run test scripts on the migrated instances.
Note
We recommend having separate workflows for Linux and Windows servers if you want to run validation tests on migrated instances.
-
Test script location: Specify the Amazon S3 bucket that contains your test script. For more information, see Getting started with Amazon S3.
-
IAM role: Choose the IAM role you created in Prerequisites.
-
Script run command: Enter the run command for your script.
Credentials to install AWS Replication Agent: Select the credentials you created in Prerequisites.