{"id":26129492,"url":"https://github.com/mathworks-ref-arch/matlab-on-aws","last_synced_at":"2025-04-05T12:07:12.428Z","repository":{"id":50126824,"uuid":"135327795","full_name":"mathworks-ref-arch/matlab-on-aws","owner":"mathworks-ref-arch","description":"Stand up a MATLAB desktop with Remote Desktop access using AWS CloudFormation","archived":false,"fork":false,"pushed_at":"2025-03-19T13:16:05.000Z","size":7593,"stargazers_count":112,"open_issues_count":0,"forks_count":45,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-29T11:09:20.489Z","etag":null,"topics":["aws","cloudformation","ec2","matlab","matlab-aws"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathworks-ref-arch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-29T17:03:19.000Z","updated_at":"2025-03-19T13:16:09.000Z","dependencies_parsed_at":"2023-02-18T08:31:37.806Z","dependency_job_id":"3e9d78fa-3c0a-410e-b069-351242f2b958","html_url":"https://github.com/mathworks-ref-arch/matlab-on-aws","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks-ref-arch%2Fmatlab-on-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks-ref-arch%2Fmatlab-on-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks-ref-arch%2Fmatlab-on-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks-ref-arch%2Fmatlab-on-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathworks-ref-arch","download_url":"https://codeload.github.com/mathworks-ref-arch/matlab-on-aws/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332609,"owners_count":20921853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cloudformation","ec2","matlab","matlab-aws"],"created_at":"2025-03-10T19:49:10.928Z","updated_at":"2025-04-05T12:07:12.409Z","avatar_url":"https://github.com/mathworks-ref-arch.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MATLAB on Amazon Web Services\n\nThis repository shows how to deploy MATLAB\u0026reg; on an Amazon EC2\u0026reg; instance using your Amazon\u0026reg; Web Services (AWS\u0026reg;) account and connect to it using the Remote Desktop Protocol (RDP), SSH, or NICE DCV. The automation uses an AWS CloudFormation template. \n\nFor 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).\n\nThis reference architecture has been reviewed and qualified by AWS.\n\n![AWS Qualified Software badge](img/aws-qualified-software.png)\n\n\n## Requirements\nYou need:\n* 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).\n* An [Amazon Web Services (AWS)](https://aws.amazon.com) account.\n* 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).\n\n## Costs\nYou 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.\n\n# Deployment Steps\nBy default, the MATLAB reference architectures below launch prebuilt machine images, described in [Learn about Architecture](#learn-about-architecture).\nUsing a prebuilt machine image is the easiest way to deploy a MATLAB reference architecture.\nPrebuilt images are provided for the five most recent MATLAB releases.\nAlternatively, to build your own machine image,\nsee [Build and Deploy Your Own Machine Image](#build-and-deploy-your-own-machine-image).\nYou can also use this workflow to install an earlier MATLAB release.\n\n## Deploy Prebuilt Machine Image\nTo view instructions for deploying the MATLAB reference architecture, select a MATLAB release:\n\n| Linux | Windows | Status |\n| ----- | ------- | ------- |\n| [R2024b](releases/R2024b/README.md) | [R2024b](https://github.com/mathworks-ref-arch/matlab-on-aws-win/tree/master/releases/R2024b/README.md) | ✅ Prebuilt available. |\n| [R2024a](releases/R2024a/README.md) | [R2024a](https://github.com/mathworks-ref-arch/matlab-on-aws-win/tree/master/releases/R2024a/README.md) | ✅ Prebuilt available. |\n| [R2023b](releases/R2023b/README.md) | [R2023b](https://github.com/mathworks-ref-arch/matlab-on-aws-win/tree/master/releases/R2023b/README.md) | ✅ Prebuilt available. |\n| [R2023a](releases/R2023a/README.md) | [R2023a](https://github.com/mathworks-ref-arch/matlab-on-aws-win/tree/master/releases/R2023a/README.md) | ⚠️ Prebuilt will be removed in September 2025. |\n| [R2022b](releases/R2022b/README.md) | [R2022b](https://github.com/mathworks-ref-arch/matlab-on-aws-win/tree/master/releases/R2022b/README.md) | ⚠️ Prebuilt will be removed in March 2025. |\n| [Earlier/Custom](./packer/v1) | [Earlier/Custom](https://github.com/mathworks-ref-arch/matlab-on-aws-win/tree/master/packer/v1) | For earlier MATLAB releases, you must build your own machine image. |\n\nThe above instructions allow you to launch instances based on the latest prebuilt MathWorks\u0026reg; Amazon Machine Images (AMIs).\nMathWorks periodically replaces older AMIs with new images.\nFor more details, see\n[When are the MathWorks Amazon Machine Images updated?](#when-are-the-mathWorks-amazon-machine-images-updated)\n\n## Build and Deploy Your Own Machine Image\nFor details of the scripts which form the basis of the MathWorks Linux AMI build process,\nsee [Build Your Own Machine Image](./packer/v1).\nYou can use these scripts to build a custom Linux machine image for running MATLAB on Amazon Web Services.\nYou can then deploy this custom image with the MathWorks infrastructure as code (IaC) templates.\n\nYou can customize the MATLAB release which is installed as part of this custom build.\nThis includes MATLAB releases supported by the prebuilt images, as well as earlier MATLAB releases.\nFor more details,\nsee [Customize MATLAB Release to Install](./packer/v1#customize-matlab-release-to-install).\n\nPlatform engineering teams can use these scripts to take advantage of optimizations MathWorks has developed\nfor running MathWorks products in the cloud.\nFor more details, see [What are the advantages of building images with MathWorks scripts?](#what-are-the-advantages-of-building-images-with-mathworks-scripts)\n\n## Learn about Architecture\n\n![MATLAB on AWS Reference Architecture](img/aws-matlab-diagram.png)\n\nDeploying 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.\n\nThe Amazon Machine Image (AMI) contains pre-installed drivers and the following software:\n* MATLAB, Simulink, toolboxes, and support for GPUs.\n* Add-ons: several pretrained deep neural networks for classification, feature extraction, and transfer learning with Deep Learning Toolbox\u0026trade;, including GoogLeNet, ResNet-50, and NASNet-Large.\n\n### Resources\n\nThe following resources will be created as part of the CloudFormation Stack:\n\n1. Security Group for SSH and RDP access\n2. EC2 Instance\n\nThe following resources might be created, depending on your deployment configuration:\n\n1. IAM role\n2. A CloudWatch log group\n3. An elastic IP address\n4. A SSM document\n\n## FAQ\n\n### When are the MathWorks Amazon Machine Images updated?\nThe links in [Deployment Steps](#deployment-steps) launch instances based on the latest MathWorks\nAMIs for at least the four most recent MATLAB releases. MATLAB releases occur twice each year.\n\nFor each MATLAB release, MathWorks periodically replaces the corresponding AMI with a newer AMI\nthat includes the latest MATLAB updates and important security updates of the base OS image.\n\nWhen MathWorks replaces an AMI, the older AMI is deleted.\nHowever, any running instances previously launched from the older AMI are not affected.\nTo continue using an older AMI, copy the AMI into your AWS account.\nFor more details on how to copy an AMI, see\n[How do I copy the AMI?](#how-do-I-copy-the-ami)\nFor more details on how to customize the reference architectures to\ndeploy the copied AMI see [How do I customize the AMI?](#how-do-I-customize-the-ami)\n\n### How do I save my changes in the AMI?\nAll your files and changes are stored locally on the EC2 Instance. They persist until you either terminate the 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:\n* Copy your files to another location, or\n* Create an image of the virtual machine.\n\n### What happens to my data if I shut down the instance?\nTo 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.\n\n### How do I keep the same public IP address?\nTo 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).\n\n### How do I manage my EC2 quotas?\nSee [Amazon EC2 Service Quotas](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html).\n\n### How do I save or copy an AMI?\nTo save an AMI, locate the EC2 Instance in the AWS web console and select **Actions** \u003e **Image** \u003e **Create Image.**\n\nTo copy the AMI for a certain MATLAB version to a target region of your choice, follow these steps:\n* 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.\n* Locate the Mappings section in the CloudFormation template. Copy the AMI ID for one of the existing regions, for example, us-east-1.\n* 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.\n* 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.\n* In your AWS Console, change your region to your target region. In the CloudFormation menu, select the **Create Stack \u003e With new resources** option. Provide the modified CloudFormation template.\n\nYou can now deploy the AMI in your target region using the AMI that you copied.\n\n### How do I customize the AMI?\nYou 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.\n\nYou can also create a custom image by building your own using the Packer scripts we provide. See [Build and Deploy Your Own Machine Image](#build-and-deploy-your-own-machine-image).\n\n### How do I use a different license manager?\nThe 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).\n\n### What are the advantages of building images with MathWorks scripts?\nImages built with MathWorks scripts are optimized and tested for MathWorks workflows.\nThe images are deployed by MathWorks CloudFormation templates following AWS best practices.\n\nThe warmup scripts found in [startup](./packer/v1/startup) allow you to start MATLAB faster. The CloudFormation template uses these scripts to automatically initialize MathWorks files on the instance. This allows MATLAB to be responsive in as little as a minute after you start it. These scripts are automatically included in both the prebuilt images and the images that you build using the instructions in [Deployment Steps](#deployment-steps).\n\nWithout the optimization scripts, starting a large software application, such as MATLAB, for the first time can potentially take tens of minutes. Subsequent starts of the large software application will be faster. This is because AWS initializes the storage for the EC2 instance, as described in [Initialize Amazon EBS volumes](https://docs.aws.amazon.com/ebs/latest/userguide/ebs-initialize.html).\n\n\n\nOther scripts in this repo also enable options for connecting to the instance, ensure that all the necessary MATLAB dependencies are installed, and make it easy to build an image with an older MATLAB release.\n\n# Technical Support\nTo request assistance or additional features, contact [MathWorks Technical Support](https://www.mathworks.com/support/contact_us.html).\n\n----\n\nCopyright 2018-2025 The MathWorks, Inc.\n\n----","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-ref-arch%2Fmatlab-on-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathworks-ref-arch%2Fmatlab-on-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-ref-arch%2Fmatlab-on-aws/lists"}