Skip navigation links

Package software.amazon.awscdk.services.ssm

AWS Systems Manager Construct Library

See: Description

Package software.amazon.awscdk.services.ssm Description

AWS Systems Manager Construct Library

---

cfn-resources: Stable

cdk-constructs: Stable


This module is part of the AWS Cloud Development Kit project.

Installation

Install the module:

 $ npm i @aws-cdk/aws-ssm
 

Import it into your code:

 // Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
 import software.amazon.awscdk.aws_ssm;
 

Using existing SSM Parameters in your CDK app

You can reference existing SSM Parameter Store values that you want to use in your CDK app by using ssm.ParameterStoreString:

using SSM parameter

Creating new SSM Parameters in your CDK app

You can create either ssm.StringParameter or ssm.StringListParameters in a CDK app. These are public (not secret) values. Parameters of type SecretString cannot be created directly from a CDK application; if you want to provision secrets automatically, use Secrets Manager Secrets (see the @aws-cdk/aws-secretsmanager package).

 // Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
 StringParameter.Builder.create(stack, "Parameter")
         .allowedPattern(".*")
         .description("The value Foo")
         .parameterName("FooParameter")
         .stringValue("Foo")
         .tier(ssm.ParameterTier.getADVANCED())
         .build();
 

creating SSM parameters

When specifying an allowedPattern, the values provided as string literals are validated against the pattern and an exception is raised if a value provided does not comply.

Skip navigation links

Copyright © 2021. All rights reserved.