I have a project API that requires some MATLAB code to run.
Currently, the MATLAB code is compiled using the MATLAB Compiler and runs with the MATLAB Runtime and Python on EC2.
I'm trying to migrate away from EC2 into AWS Lambda. This requires me to package the MATLAB compiled executable into the Lambda package somehow.
As I see it, there are two options:
Has anyone had any experience using MATLAB on AWS Lambda or something similar? Do I have any alternatives from here?
I don't have experience running an AWS lambda function in this way but you shouldn't really have a problem.
There are AWS docs on how to do this. Perhaps start here: https://aws.amazon.com/blogs/compute/running-executables-in-aws-lambda/
I have done this in the past with a Node.js executable of version that was not available in the standard Lambda stack at the time.
The basic steps are:
There's no reason you shouldn't be able to get this done with a matlab executable, barring the total size of the bundle. If the bundle size is too large, you may run into restrictions and cold-start issues.
Hope this helps.