Linux - Application Migration Service


  1. Ensure that the necessary service roles have been created by clicking on the Reinitialize service permissions button on the Application Migration Service Console Replication settings page. You must have the permissions necessary to create IAM roles in order for this operation to succeed.

  2. Download the agent installer with the wget command your Linux source server. This wget command will download the Agent installer file - onto your server.

    The Agent installer follows the following format: https://aws-application-migration-service-<region>.s3.<region> . Replace <region> with the AWS Region into which you are replicating.

    The following is an example of the full wget command for us-east-1:

    wget -O ./

    The command line will indicate when the installer has been successfully downloaded.


    You need root privileges to run the Agent installer file on a Linux server. Alternatively, you can run the Agent Installer file with sudo permissions.


    If you need to validate the installer hash, the correct hash can be found here: https://aws-application-migration-service-hashes-<region>.s3.<region> (replace <region> with the AWS Region into which you are replicating. Ex. us-east-1:


    The Linux installer creates the "Application Migration Service" group and "Application Migration Service" user within that group. The Agent will run within the context of the newly created user. Agent installation will attempt to add the user to "sudoers". Installation will fail if the Agent is unable to add the newly created "Application Migration Service" user to "sudoers" .


    AWS Regions that are not opt-in also support the shorter installer path: https://aws-application-migration-service-<region> . Replace <region> with the AWS Region into which you are replicating.


    You can generate a custom installation command through the Add servers prompt. Learn more about the Add servers prompt.

  3. Once the Agent installer has successfully downloaded, copy and input the installer command into the command line on your source server in order to run the installation script.

    sudo python3

    If you require additional customization, you can add a variety of parameters to the installation script in order to manipulate the way the Agent is installed on your server. Add the parameters to the end of the installation script.

    Available parameters include:

    • --no-prompt

      This parameter will run a silent installation.

    • --devices

      This parameter specifies which specific disks to replicate.

    • --force-volumes

      This parameter must be used with the --no-prompt parameter. This parameter will cancel the automatic detection of physical disks to replicate. You will need to specify the exact disks to replicate using the --devices parameter (including the root disk, failure to specify the root disk will cause replication to fail). This parameter should only be used as a troubleshooting tool if the --devices parameter fails to identify the disks correctly.

    • --tags

      Use this parameter to add resource tags to the Source server. Use a space to separate each tag (for example: --tags KEY=VALUE [KEY=VALUE ...])


      This flag may only be used when adding new source servers to MGN. You cannot use the --tags flag to modify tags of source servers that have already been added to MGN.

    • --s3-endpoint

      Use this parameter to specify a VPC endpoint you created for S3 if you do not wish to open your firewall ports to access the default S3 endpoint. Learn more about installing the Agent on a blocked network.

    • --endpoint

      Use this parameter to specify the Private Link endpoint you created for Application Migration Service if you do not wish to open your firewall ports to access the default MGN endpoint. Learn more about installing the Agent on a blocked network.

    The installer will confirm that the installation of the AWS Replication Agent has started.

  4. The installer will prompt you to enter your AWS Region Name, the AWS Access Key ID, the AWS Secret Access Key (and the AWS Session Token if appropriate) that you previously generated. Enter the complete AWS Region name (for example: eu-central-1), the full AWS Access Key ID and the full AWS Secret Access Key.


    You can also enter these values as part of the installation script command parameters. If you do not enter these parameters as part of the installation script, you will be prompted to enter them one by one as described above. (for example: sudo python3 --region regionname --aws-access-key-id AKIAIOSFODNN7EXAMPLE --aws-secret-access-key wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY)


    The AWS Access Key ID and AWS Secret Access Key values will be hidden when entered into the installer.

  5. Once you have entered your credentials, the installer will identify volumes for replication. The installer will display the identified disks and prompt you to choose the disks you want to replicate.

    To replicate some of the disks, type the path of the disks, separated by a comma, as illustrated in the installer (such as: /dev/sda, /dev/sdb, etc). To replicate all of the disks, press Enter. The installer will identify the selected disks and print their size.

    The installer will confirm that all disks were successfully identified.


    When identifying specific disks for replication, do not use apostrophes, brackets, or disk paths that do not exist. Type only existing disk paths. Each disk you selected for replication is displayed with the caption Disk to replicate identified. However, the displayed list of identified disks for replication may differ from the data you entered. This difference can due to several reasons:

    • The root disk of the source server is always replicated, whether you select it or not. Therefore, it always appears on the list of identified disks for replication.

    • Application Migration Service replicates whole disks. Therefore, if you choose to replicate a partition, its entire disk will appear on the list and will later be replicated. If several partitions on the same disk are selected, then the disk encompassing all of them will appear only once on the list.

    • Incorrect disks may be chosen by accident. Ensure that the correct disks have been chosen.


    If disks are disconnected from a server, Application Migration Service can no longer replicate them, so they are removed from the list of replicated disks. When they are re-connected, the AWS Replication Agent cannot know that these were the same disks that were disconnected and therefore does not add them automatically. To add the disks after they are reconnected, rerun the AWS Replication Agent installer on the server.

    Note that the returned disks will need be replicated from the beginning. Any disk size changes will be automatically identified, but this will also cause a resync. Perform a test after installing the Agent to ensure that the correct disks have been added.

  6. After all of the disks that will be replicated have been successfully identified, the installer will download and install the AWS Replication Agent on the source server.

  7. Once the AWS Replication Agent is installed, the server will be added to the Application Migration Service Console and will undergo the initial sync process. The installer will provide you with the source server's ID.

    You can review this process in real time on the Source Servers page. Learn more about the initial sync process.