Discover VMs on AWS

The Migration Center discovery client CLI lets you collect information about your EC2 instances on AWS. It then sends this information to Migration Center, where you can continue with your assessment.

This document describes the steps to run an inventory discovery on your AWS environment using the mcdc CLI.

Information available in the inventory discovery

The mcdc CLI collects the following information from your EC2 instances:

  • Instance ID, name, and region
  • Instance type
  • Machine size, including CPU, memory, and storage size
  • Guest OS: name, version, architecture
  • Power state (on/off)
  • Network interfaces and associated IP and MAC addresses
  • Disks: interface type, volume type, label, size
  • Performance data
  • Hyperthreading support

Before you begin

  1. Review the requirements for downloading and running the mcdc CLI.
  2. Complete the steps to download mcdc CLI.

Configure the AWS environment

The following sections describe how to configure your AWS environment to allow the mcdc CLI to collect data from your EC2 instances.

Create an AWS IAM policy

Create an AWS IAM policy with the following permissions to read inventory data:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ec2:DescribeRegions",
        "ec2:DescribeInstances",
        "ec2:DescribeVolumes",
        "ec2:DescribeInstanceTypes",
        "ssm:DescribeInstanceInformation",
        "cloudwatch:GetMetricData"
      ],
      "Resource": "*"
    }
  ]
}

Create an IAM user on AWS

  1. Create a dedicated IAM user to interact with the AWS API.
  2. Attach the IAM policy you created in the previous step to your new user.
  3. Create an access key. In the AWS console, navigate to the user you've created in the previous step: User > Security Credentials > Create access key > Other > Next > Create access key.
  4. Store the Access key ID and Secret access key generated during this step. You need them to scan the AWS inventory using the mcdc CLI.

Run an inventory discovery on AWS

To collect inventory information from your EC2 instances, it is sufficient to run the inventory scan once. You might repeat this operation if you want to scan multiple regions.

  • Run the inventory discovery:

    Linux

    ./mcdc discover aws --access-key-id YOUR_ACCESS_KEY_ID --secret-access-key YOUR_SECRET_ACCESS_KEY
    

    Windows

    mcdc.exe discover aws --access-key-id YOUR_ACCESS_KEY_ID --secret-access-key YOUR_SECRET_ACCESS_KEY
    

    Replace the following:

    When the discovery finishes, review the collected data with the following command:

    Linux

    ./mcdc discover ls

    Windows

    mcdc.exe discover ls

    The output should look similar to the following:

    Collected 166 VMs
    [✓] Collection completed.
    

What's next