Main Content

Create a Custom Amazon Machine Image (AMI)

You can use an Amazon® Machine Image (AMI) when creating a cloud cluster. To create your custom AMI for this purpose, you modify an AMI provided in Cloud Center. Then you can install drivers, libraries, or other utilities, so that they are available for subsequent clusters without having to reinstall them each time.

Use the following procedure to create and customize a cluster AMI in the Amazon EC2® Dashboard of the AWS Management Console.

  1. Start a cluster in Cloud Center as usual, specifying the MATLAB Version you need. This cluster needs only one worker, and under Advance Options you can choose None for persisted storage space.

  2. In a separate browser window, navigate to the AWS Management Console at
    https://console.aws.amazon.com. Select Services > EC2, then click Instances (running). Your instances will include clusters you start in Cloud Center.

  3. Select the running instance you started in step 1. It has the same name as the cluster in Cloud Center.

  4. In the Instance Details section (lower half of page), look for the AMI ID of your new instance. Note or copy the value shown in parentheses. It will be the string starting with ami- followed by some hexadecimal code.

  5. Shut down the cluster in Cloud Center. You no longer need it; you can delete it if you want to.

  6. In the AWS Management Console, click Launch Instance. This opens a page with expandable sections.

  7. In the Applications and OS Images (Amazon Machine Image) section:

    1. Select My AMIs.

    2. Select: Shared with me.

    3. In the Amazon Machine Image (AMI) field, select the AMI ID value noted above (starts with ami-).

  8. In the Instance Type section, select a type to create your AMI. This is the instance type you use only during the creation of the AMI. After you create the AMI, you can launch other instance types from this AMI.

  9. In the Key pair (login) section, select an existing key pair or create a new one.

  10. In the Network Settings section, select Create security group. Check the option Allow SSH traffic from, and select My IP from the drop-down menu.

  11. Click Launch instance.

  12. In the AWS Management Console, click Instances to track the progress of your instance. The Instance State for your new instance should say Running before you proceed.

  13. If necessary, log on to the new instance via SSH and install any libraries, drivers, etc.

  14. Stop the running instance by selecting it in the AWS Management Console, then clicking Actions > Stop.

  15. In the AWS Management Console select the instance (it might still be selected) and click Actions > Create Image.

  16. Provide a name and description that will help you identify your new AMI. Use a name that suggests the MATLAB version, installed libraries or drivers, etc. Click Create Image. Note its AMI ID.

In Cloud Center, you can now use that AMI when starting a new cluster. It will be available in the Operating System Image drop-down list in the Advanced Options of the Create Cluster dialog box. Ensure that the instance type you want to launch from this AMI is compatible with any specialized drivers or software in the AMI.

Related Topics