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.
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.
In a separate browser window, navigate to the AWS Management Console at
https://console.aws.amazon.com
. Select
Services > EC2, then click Running
Instances. Your instances will include clusters you start in Cloud
Center.
Select the running instance you started in step 1. It has the same name as the cluster in Cloud Center.
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.
Shut down the cluster in Cloud Center. You no longer need it; you can delete it if you want to.
In the AWS Management Console, click Launch Instance at the top of the page. This starts a wizard with the steps shown in tabs at the top of the page; the first tab is Choose AMI.
On the left side, choose the following settings:
Select My AMIs.
Select Ownership: Shared with
me
.
In the Search My AMIs field, enter the AMI ID value noted
above (starts with ami-
, do not include parentheses). When your
instance is shown, click Select.
Click the tab Choose Instance Type, and select a type.
Click the tab Configure Security Groups.
Modify or add a security rule with the following settings:
Type | SSH |
Protocol | TCP |
Port Range | 22 |
Source | My IP |
Click Review and Launch.
If you see a dialog box asking about booting from General Purpose (SSD), select your preferred option and click Next.
If everything looks correct in the review dialog box, click Launch.
You will be asked to select a key pair. You can use an existing key pair that you have access to. After acknowledging, click Launch Instances.
You can track the progress of your instance. Click View
Instances. The Instance State for your new
instance should say Running
before you proceed.
If necessary, log on to the new instance via SSH and install any libraries, drivers, etc.
Stop the running instance by selecting it in the AWS Management Console, then clicking Actions > Stop.
In the AWS Management Console select the instance (it might still be selected) and click Actions > Create Image.
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.