MATLAB® interface for the Amazon Web Services Systems Manager™. Systems Manager (formerly Simple Systems Management (SSM)) provides a collection of capabilities for configuring and managing Amazon EC2 instances, on-premises servers and virtual machines (VMs), and certain other AWS resources.
The complete Systems Manager is API very large. This package implements limited Parameter Store support. If additional features and methods would be helpful to you please submit an enhancement request as detailed below.
- Requires MATLAB release R2017a or later.
- AWS Common utilities found at https://github.com/mathworks-ref-arch/matlab-aws-common
- Amazon Web Services account
To build a required JAR file:
- Maven
- JDK 7
- AWS SDK for Java (version 1.11.567 or later)
Please refer to the Documentation to get started. The Installation Instructions and Getting Started documents provide detailed instructions on setting up and using the interface. The easiest way to fetch this repository and all required dependencies is to clone the top-level repository using:
git clone --recursive https://github.com/mathworks-ref-arch/mathworks-aws-support.git
The MATLAB code uses the AWS SDK for Java and can be built using:
cd Software/Java
mvn clean package
Once built, use the /Software/MATLAB/startup.m
function to initialize the interface which will use the AWS Credentials Provider Chain to authenticate. Please see the relevant documentation on how to specify the credentials.
% Create client
ssm = aws.simplesystemsmanagement.AWSSimpleSystemsManagementClient();
% Use local static credentials rather than the provider chain in this case
ssm.useCredentialsProviderChain = false;
% Initialize the client
ssm.initialize();
% Now use the client to carry out actions
% Set some values
myParameterName = 'mytestparamname12345678';
myParameterValue = 'mytestparamvalue12345678';
% Build a put parameter request
putParameterRequest = aws.simplesystemsmanagement.model.PutParameterRequest();
putParameterRequest.setName(myParameterName);
putParameterRequest.setValue(myParameterValue);
putParameterRequest.setType('String');
% Use the request to put the parameter
putParameterResult = ssm.putParameter(putParameterRequest);
% Build a get parameter request
getParameterRequest = aws.simplesystemsmanagement.model.GetParameterRequest();
getParameterRequest.setName(myParameterName);
getParameterResult = ssm.getParameter(getParameterRequest);
% Use the request to get the parameter set above
parameter = getParameterResult.getParameter();
% The returned value should equal the previously set value
returnedValue = parameter.getValue();
% Delete the parameter when no longer needed
deleteParameterRequest = aws.simplesystemsmanagement.model.DeleteParameterRequest();
deleteParameterRequest.setName(myParameterName);
deleteParameterResult = ssm.deleteParameter(deleteParameterRequest);
% Shutdown the client when no longer needed
ssm.shutdown();
- MATLAB (R2017a or later)
- MATLAB Compiler™ and MATLAB Compiler SDK™ (R2017a or later)
- MATLAB Production Server™ (R2017a or later)
- MATLAB Parallel Server™ (R2017a or later)
The license for the MATLAB Interface for AWS Systems Manager is available in the LICENSE.md file in this GitHub repository. This package uses certain third-party content which is licensed under separate license agreements. See the pom.xml file for third-party software downloaded at build time.
Provide suggestions for additional features or capabilities using the following link:
https://www.mathworks.com/products/reference-architectures/request-new-reference-architectures.html
Email: mwlab@mathworks.com
or please log an issue.