Most MATLAB licenses can be used on Amazon Elastic Compute Cloud (EC2) and other cloud hosting services. Home and Student licenses cannot be used on Amazon EC2 or other cloud services.
MathWorks currently does not offer pre-built Amazon Machine Images (AMI) with MATLAB installed. Since pre-built AMI's are not currently offered, In order to use MATLAB on Amazon EC2, you must create a custom machine image and proceed to install MATLAB on it.
Due to the nature of a cloud platform your host ID, a value used to verify that your MATLAB license is running on the licensed machine, could change when terminating and restarting your machine instance. As such is it recommended that you use a Login Named User (LNU) enabled license, for more information on LNU licenses please see the following support article:
If you have additional questions specific to hosting a custom machine instance, please contact Amazon.