Skip to content

Commit e69e0de

Browse files
R2023b release!
1 parent 77c5c7e commit e69e0de

File tree

4 files changed

+95
-55
lines changed

4 files changed

+95
-55
lines changed

README.md

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
# MATLAB on Amazon Web Services
22

3-
## Requirements
4-
Before starting, you will need the following:
5-
* A MATLAB® license. For more information, see [Confirm Licensing for MathWorks Products Running on the Cloud](https://www.mathworks.com/help/install/license/licensing-for-mathworks-products-running-on-the-cloud.html).
6-
* An Amazon Web Services® (AWS) account.
7-
* A Key Pair for your AWS account in the appropriate region. For more information, see [Amazon EC2 Key Pairs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html).
3+
This repository shows how to deploy MATLAB® on an Amazon EC2® instance using your Amazon® Web Services (AWS®) account and connect to it using the Remote Desktop Protocol (RDP), SSH, or NICE DCV. The automation uses an AWS CloudFormation template.
84

9-
## Costs
10-
You are responsible for the cost of the AWS services used when you create cloud resources using this guide. Resource settings, such as instance type, will affect the cost of deployment. For cost estimates, see the pricing pages for each AWS service you will be using. Prices are subject to change.
5+
For information about the architecture of this solution, see [Learn about Architecture](#learn-about-architecture). For information about templates, see [AWS CloudFormation Templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-guide.html).
6+
7+
This reference architecture has been reviewed and qualified by AWS.
8+
9+
![AWS Qualified Software badge](img/aws-qualified-software.png)
1110

12-
## Introduction
1311

14-
The following guide will help you automate the process of running the MATLAB desktop on Amazon Web Services using a virtual machine and connect to it using the Remote Desktop Protocol (RDP) or SSH. The automation is accomplished using an AWS CloudFormation template. The template is a JSON file that defines the resources needed to run MATLAB on AWS. For information about the architecture of this solution, see [Architecture and Resources](#architecture-and-resources). For information about templates, see [AWS CloudFormation Templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-guide.html).
12+
## Requirements
13+
You need:
14+
* A MATLAB license. For more information, see [License Requirements for MATLAB on Cloud Platforms](https://www.mathworks.com/help/install/license/licensing-for-mathworks-products-running-on-the-cloud.html).
15+
* An [Amazon Web Services (AWS)](https://aws.amazon.com) account.
16+
* A key pair for your AWS account, in the appropriate region. For more information, see [Amazon EC2 Key Pairs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html).
1517

16-
## Prepare your AWS Account
1718

18-
1. If you don't have an AWS account, create one at https://aws.amazon.com by following the on-screen instructions.
19-
2. Use the regions selector in the navigation bar to choose a region supported for the release of MATLAB that you want to deploy.
20-
3. Create a [key pair](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) in that region. The key pair is necessary as it is the only way to connect to the instance as an administrator.
21-
4. If necessary, [request a service limit increase](https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-) for the Amazon EC2 instance type or VPCs. You might need to do this if you already have existing deployments that use that instance type or you think you might exceed the [default limit](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html) with this deployment.
19+
## Costs
20+
You are responsible for the cost of the AWS services used when you create cloud resources using this guide. Resource settings, such as instance type, affect the cost of deployment. For cost estimates, see the pricing pages for each AWS service you will be using. Prices are subject to change.
2221

2322
# Deployment Steps
2423

@@ -43,15 +42,16 @@ MathWorks periodically replaces older AMIs with new images.
4342
For more details, see
4443
[When are the MathWorks Amazon Machine Images updated?](#when-are-the-mathWorks-amazon-machine-images-updated)
4544

46-
## Architecture and Resources
45+
## Learn about Architecture
4746

4847
![MATLAB on AWS Reference Architecture](img/aws-matlab-diagram.png)
4948

5049
Deploying this reference architecture sets up a single AWS EC2 instance containing MATLAB, a private VPC with an internet gateway, a private subnet, and a security group that opens the appropriate ports for SSH and RDP access.
5150

52-
To make deployment easy, we have prepared an Amazon Machine Image (AMI) with pre-installed drivers. The AMI contains the following software:
53-
* MATLAB, Simulink, Toolboxes, and support for GPUs.
54-
* Add-ons: Several pretrained deep neural networks for classification, feature extraction, and transfer learning with Deep Learning Toolbox™, including GoogLeNet, ResNet-50, and NASNet-Large.
51+
The Amazon Machine Image (AMI) contains pre-installed drivers, and the following software:
52+
* MATLAB, Simulink, toolboxes, and support for GPUs.
53+
* Add-ons: several pretrained deep neural networks for classification, feature extraction, and transfer learning with Deep Learning Toolbox™, including GoogLeNet, ResNet-50, and NASNet-Large.
54+
5555

5656
### Resources
5757

@@ -60,7 +60,7 @@ The following resources will be created as part of the CloudFormation Stack:
6060
1. Security Group for SSH and RDP access
6161
2. EC2 Instance
6262

63-
The following resources may be created according to your deployment configuration:
63+
The following resources might be created, depending on your deployment configuration:
6464

6565
1. IAM role
6666
2. A CloudWatch log group
@@ -85,40 +85,42 @@ For more details on how to customize the reference architectures to
8585
deploy the copied AMI see [How do I customize the AMI?](#how-do-I-customize-the-ami)
8686

8787
### How do I save my changes in the AMI?
88-
All your files and changes are stored locally on the virtual machine. They will persist until you either terminate the virtual machine instance or delete the stack. Stopping the instance does not destroy the data on the instance. If you want your changes to persist outside the stack or before you terminate an instance, you’ll need to:
89-
* Copy your files to another location (*Example*: S3 or Mount an Amazon EBS volume and create a snapshot), or
88+
All your files and changes are stored locally on the virtual machine. They persist until you either terminate the virtual machine instance or delete the stack. Stopping the instance does not destroy the data on the instance. If you want your changes to persist outside the stack or before you terminate an instance, you need to:
89+
* Copy your files to another location, or
9090
* Create an image of the virtual machine.
9191

9292
### What happens to my data if I shut down the instance?
93-
You may want to shut down the instance when you aren’t using it to save some money (you only pay for the storage used by the virtual machine when it is stopped). To shut down an EC2 instance, locate it in the AWS web console, select the instance and choose “Instance State/Stop” from the “Actions” menu. You can restart it from the same menu. Any files or changes made to the virtual machine will persist when shutting down and will be there when you restart. A side-effect of shutting down the virtual machine and restarting is that the public IP address and DNS name may change. Inspecting the EC2 instance in the AWS console will reveal the new IP address and DNS name.
93+
To minimize costs, you might want to shut down the instance when you are not using it. When the virtual machine is stopped, you are only charged for storage. To shut down an EC2 instance, locate it in the AWS web console, select the instance and choose “Instance State/Stop” from the “Actions” menu. You can restart it from the same menu. Any files or changes you make to the virtual machine will persist when you shut it down and will be present when you restart it. Shutting down the virtual machine and restarting it might change the public IP address and DNS name. Inspecting the EC2 instance in the AWS console will reveal the new IP address and DNS name.
9494

9595
### How do I keep the same public IP address?
96-
To avoid having to change the IP address between restarts, you can enable the *Keep public IP address the same* during deployment. For more information, see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html.
96+
To avoid having to change the IP address between restarts, enable the **Keep public IP address the same** option during deployment. For more information, see (Elastic IP addresses)[https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html].
97+
98+
### How do I manage my EC2 quotas?
99+
See [Amazon EC2 Service Quotas](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html).
97100

98-
### How do I save an AMI?
101+
### How do I save or copy an AMI?
99102
To save an AMI, locate the EC2 Instance in the AWS web console and select **Actions** > **Image** > **Create Image.**
100103

101-
### How do I copy the AMI?
102104
To copy the AMI for a certain MATLAB version to a target region of your choice, follow these steps:
103105
* Choose the MATLAB release that you want to copy from the Releases folder of this repository. Download and open the CloudFormation template .json file for that release.
104106
* Locate the Mappings section in the CloudFormation template. Copy the AMI ID for one of the existing regions, for example, us-east-1.
105107
* To copy the AMI to your target region, see [Copy an AMI](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html) in the AWS documentation.
106108
* In the Mappings section of the CloudFormation template, add a new RegionMap pair corresponding to your target region. Insert the new AMI ID of the AMI in the target region.
107-
* In your AWS Console, change your region to your target region. In the CloudFormation menu, select Create Stack > With new resources option. Provide the modified CloudFormation template.
109+
* In your AWS Console, change your region to your target region. In the CloudFormation menu, select the **Create Stack > With new resources** option. Provide the modified CloudFormation template.
108110

109111
You can now deploy the AMI in your target region using the AMI that you copied.
110112

111113
### How do I customize the AMI?
112-
You can customize an AMI by launching the reference architecture, applying any changes you want to the EC2 Instance (such as installing additional software, drivers, and files), and then saving an image of that instance using the AWS Console. For more information, see [How do I save an AMI?](#how-do-i-save-an-ami). When you create a stack, replace the AMI ID in the CloudFormation template with the AMI ID of your customized image.
114+
You can customize a prebuilt AMI by launching the reference architecture, applying changes you want to the EC2 Instance (such as installing additional software, drivers, and files), then saving an image of that instance using the AWS Console. For more information, see [How do I save or copy an AMI?](#how-do-i-save-or-copy-an-ami). When you create a stack, replace the AMI ID in the CloudFormation template with the AMI ID of your customized image.
113115

114116
### How do I use a different license manager?
115117
The AMI uses MathWorks Hosted License Manager by default. For information on how to use other license managers, see [MATLAB Licensing in the Cloud](https://www.mathworks.com/help/licensingoncloud/matlab-on-the-cloud.html).
116118

117119
# Technical Support
118-
If you require assistance or have a request for additional features or capabilities, please contact [MathWorks Technical Support](https://www.mathworks.com/support/contact_us.html).
120+
To request assistance or additional features, contact [MathWorks Technical Support](https://www.mathworks.com/support/contact_us.html).
119121

120122
----
121123

122-
Copyright 2018-2023 The MathWorks, Inc.
124+
Copyright 2018-2024 The MathWorks, Inc.
123125

124126
----

img/aws-qualified-software.png

5.56 KB
Loading

releases/R2023b/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## Step 1. Launch the Template
44

5-
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.
5+
Click the **Launch Stack** button to deploy a standalone MATLAB® desktop client on AWS®. This
6+
opens the CloudFormation Create Stack screen in your web browser.
67

78
| Region | Launch Link |
89
| --------------- | ----------- |
@@ -54,6 +55,7 @@ After you click the Launch Stack button above, the “Create stack” page will
5455
| **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. |
5556
| **Use Elastic IP address that persists across machine reboots** | Flag indicating whether you want to keep the same public IP address for the instance. |
5657
| **AutoShutdown** | Choose whether you want to enable autoshutdown for your instance after a certain number of hours |
58+
| **Custom AMI ID (Optional)** | ID of a custom Amazon Machine Image (AMI) in the target region (optional). If the build has been customized then the resulting machine image may no longer be compatible with the provided CloudFormation template. Compatability can in some cases be restored by making corresponding modifications to the CloudFormation template. The ID should start with 'ami-'. |
5759
| **Optional user inline command** | Provide an optional inline PowerShell command to run on machine launch. For example, to set an environment variable CLOUD=AWS, use this command excluding the angle brackets: \<[System.Environment]::SetEnvironmentVariable("CLOUD","AWS", "Machine");>. You can use either double quotes or two single quotes. To run an external script, use this command excluding the angle brackets: \<Invoke-WebRequest "https://www.example.com/script.ps1" -OutFile script.ps1; .\script.ps1>. Find the logs at '$Env:ProgramData\MathWorks\startup.log'. |
5860

5961

@@ -96,6 +98,6 @@ This CloudFormation template uses nested stacks to reference templates used by m
9698

9799
----
98100

99-
Copyright 2020-2023 The MathWorks, Inc.
101+
Copyright 2020-2024 The MathWorks, Inc.
100102

101103
----

0 commit comments

Comments
 (0)