My goal is to call an Octave(MATLAB) program on my EC2 instance from my Node/Express app and consume the results from that program (it will be in csv format) back in my Node app. I will pass a data file to the Octave program, and the length of the data file will be different each time I run my Node app. That's because my Node.js wrapper will take user input (start and end times), fetch data from an API, then I need to pass that data file to the MATLAB app for it to process.
I figured out how to connect to my EC2 instance using AWS SDK for Node's EC2InstanceConnect method. But now I can't figure out how to call the program on the instance, wait for the response, and then handle the resulting csv.
Since I know how to run the program when I'm SSH'd into my EC2 instance, I started thinking I need more of an SSH forwarding solution for this problem. But if there's a way to do it with the AWS SDK that would be better. I'm having a hard time finding examples online that are similar to my use case.