AWS SDK - SSM

Example usage

SsmClient ssmClient = AwsUtils.GetSsmClient(Region.AP_SOUTHEAST_1);

try {	
  String value1 = AwsUtils.getSsmParamValue(ssmClient, "normal_string_without_encryption");
  String value2 = AwsUtils.getSsmParamValueWithDecryption(ssmClient, "secure_string_encrypted_with_kms");
} catch (SsmException e) {
  LOG.error("failed to get ssm param value", e);
  throw e;
} finally {
  ssmClient.close();
}

Maven dependencies

//pom.xml
  <dependencies>
    <!-- https://mvnrepository.com/artifact/software.amazon.awssdk/ssm -->
    <dependency>
      <groupId>software.amazon.awssdk</groupId>
      <artifactId>ssm</artifactId>
      <version>2.17.229</version>
    </dependency>

AWS Utilities

Reference

Last updated

Was this helpful?