Click the Launch Stack button to deploy a standalone MATLAB desktop client on AWS. This will open the CloudFormation Create Stack screen in your web browser.
Note: Creating a stack on AWS can take a few minutes.
After you click the Launch Stack button above, the “Create stack” page will open in your browser where you can configure the parameters. It is easier to complete the steps if you position these instructions and the AWS console window side by side.
-
Specify a stack name. This will be shown in the AWS CloudFormation console and must be unique within the AWS account.
-
Specify and check the defaults for these resource parameters:
Parameter label | Description |
---|---|
AWS EC2 Instance type | AWS instance type to use for MATLAB. See https://aws.amazon.com/ec2/instance-types for a list of instance types. |
Instance Name | Name for the MATLAB virtual machine |
Storage Size (GiB) | Size in GB of the root volume |
Custom IAM Role (Optional) | Name of a custom IAM Role to associate with this instance. If not specified, a predefined role is used. If specified, features requiring special permissions will be unavailable (NICE DCV, CloudWatch, IAM Policies). |
Additional IAM Policies (Optional) | Semicolon-delimited list of IAM Policy ARNs to add to the predefined role. This option cannot be used with a custom IAM Role. |
VPC to deploy this stack to | ID of an existing VPC in which to deploy this stack |
Subnet | ID of an existing subnet |
RDP Key Pair | Name of an existing EC2 KeyPair to allow RDP access to all the instances. See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html for details on creating these. |
Allow RDP and SSH connections from | IP address range that will be allowed to connect to this instance from outside of the VPC. This field should be formatted as <ip_address>/<mask>. E.g. 10.0.0.1/32. This is the public IP address which can be found by searching for 'what is my ip address' on the web. The mask determines the number of IP addresses to include. A mask of 32 is a single IP address. This calculator can be used to build a specific range: https://www.ipaddressguide.com/cidr. You may need to contact your IT administrator to determine which address is appropriate. |
Remote password | Password for the user Administrator |
Confirm remote password | Confirm Password |
License Manager for MATLAB connection string | Optional License Manager for MATLAB string in the form <port>@<hostname>. If not specified, online licensing is used. If specified, the license manager must be accessible from the specified VPC and subnets. If the Network License Manager for MATLAB was deployed using the reference architecture, this can be achieved by specifying the security group of that deployment as the AdditionalSecurityGroup parameter, and by using the private hostname of the license manager host. |
Configure cloudwatch logging for the MATLAB instance | Flag indicating whether cloudwatch logging for the MATLAB instance is enabled. |
Additional security group to place instances in | ID of an additional (optional) Security Group for the instances to be placed in. Often the License Manager for MATLAB's Security Group. |
Use Elastic IP address that persists across machine reboots | Flag indicating whether you want to keep the same public IP address for the instance. |
AutoShutdown | Choose whether you want to enable autoshutdown for your instance after a certain number of hours |
Note: If you chose to associate an IAM role above you'll need to acknowledge that it may create IAM resources in the Capabilities before creating the stack.
- Click the Create Stack button. The CloudFormation service will start creating the resources for the stack.
After clicking Create you will be taken to the Stack Detail page for your stack. Wait for the Status to reach CREATE_COMPLETE. This may take up to 10 minutes.
- Expand the Outputs section in the Stack Detail page.
- Look for the key named
RDPSSHConnection
and copy the corresponding public DNS name listed under value. For example: ec2-11-222-33-44.compute-1.amazonaws.com - Launch any remote desktop client, paste the public DNS name in the appropriate field, and connect. On the Windows Remote Desktop Client you need to paste the public DNS name in the Computer field and click Connect.
- In the login screen that's displayed, use the username
Administrator
and the password you specified while setting up the stack in Step 2. - You can also connect using SSH from the terminal using the format:
ssh Administrator@<DNS name>
. For example: ssh [email protected]
Double-click the MATLAB icon on the virtual machine desktop to launch MATLAB. The first time you start MATLAB you will need to activate it. By default, you will be asked to use your MathWorks Account to activate MATLAB. For other ways to activate MATLAB, see MATLAB Licensing in the Cloud.
Note: It may take a few minutes for activation to complete and MATLAB to start. You will experience this delay only the first time you start MATLAB.
CloudWatch logs enables you to access logs from all the resources in your stack in a single place. To use CloudWatch logs, launch the stack with the feature "Configure cloudwatch logging for the MATLAB instance" enabled. Once the stack deployment is complete, you can access your logs in the "Outputs" of the stack by clicking the link next to "CloudWatchLogs". Note that if you delete the stack, the CloudWatch log group is also deleted. For more information, see What is Amazon CloudWatch Logs?.
If you are running a GPU instance that belongs to G3, G4dn or G5 instance type, you can install NVIDIA GRID Drivers using the Install-NVIDIAGridDriver.ps1
script placed in the C:\Windows\NVIDIADrivers\
directory. These drivers are certified to provide optimal performance for visualization applications that render content such as 3D models or high-resolution videos. A possible use case for the same would be if you plan to use Automated Driving toolbox to run simulations in a rich 3D-environment. Please note that, for the installation of GRID drivers to complete, a machine restart is required.
Once you have finished using your stack, it is recommended that you delete all resources to avoid incurring further cost. To delete the stack, do the following:
- Log in to the AWS Console.
- Go to the AWS CloudFormation page and select the stack you created.
- Click the Actions button and click Delete Stack from the menu that appears.
The following resources will be created as part of the CloudFormation Stack.
- Security Group for SSH and RDP access
- EC2 Instance