Why do I receive an " 'aws' is not recognized as an internal or external command, operable program or batch file." error on MATLAB Production Server?
24 views (last 30 days)
Show older comments
MathWorks Support Team
on 18 May 2023
Edited: MathWorks Support Team
on 31 Jan 2025
I am working on a MATLAB Production Server (MPS) instance deployed to AWS using the cloud formation template from the reference architecture. I have a function deployed to this MPS instance, which writes to S3 storage using a system call that calls the AWS CLI.
When the MPS workers attempt to run this function, they fail to write to S3. The following error message is passed to "cmdout":
'aws' is not recognized as an internal or external command, operable program or batch file.
Why do I receive this error?
Accepted Answer
MathWorks Support Team
on 17 Jan 2025
Edited: MathWorks Support Team
on 31 Jan 2025
This error indicates that the AWS CLI is not installed on the worker machine(s). The AWS CLI is required to write to S3 from the command line. The reference architecture does not install the AWS CLI by default, so this must be installed manually on all workers running this function.
To resolve this error, RDP into any workers that are raising this error and complete the following steps to install the AWS CLI:
After completing these steps, restart the MPS for changes to take effect.
Alternatively, you can access S3 storage directly from your MATLAB code without the use of the AWS CLI. To view the release-specific documentation for more information, please run the following command in the MATLAB R2019b command window:
>> web(fullfile(docroot, 'matlab/import_export/work-with-remote-data.html'))
Please follow the below link to search for the required information regarding the current release:
0 Comments
More Answers (0)
See Also
Categories
Find more on Server Management in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!