Skip to content

mathworks-ref-arch/matlab-aws-ssm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MATLAB Interface for AWS Systems Manager

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.

Requirements

MathWorks products

3rd party products

  • Amazon Web Services account

To build a required JAR file:

Getting Started

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

Build the AWS SDK for Java components

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.

Write and read a parameter

% 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();

Supported Products:

  1. MATLAB (R2017a or later)
  2. MATLAB Compiler™ and MATLAB Compiler SDK™ (R2017a or later)
  3. MATLAB Production Server™ (R2017a or later)
  4. MATLAB Parallel Server™ (R2017a or later)

License

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.

Enhancement Request

Provide suggestions for additional features or capabilities using the following link:
https://www.mathworks.com/products/reference-architectures/request-new-reference-architectures.html

Support

Email: [email protected] or please log an issue.

About

MATLAB interface for AWS SSM

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •