Infrastructure as Java Code (IaJC): Setting AWS System Manager Parameter

The StringParameter.Builder sets a value in the AWS Systems Manager Parameter Store using the AWS Cloud Development Kit (CDK) in Java:


public class CDKStack extends Stack {

    public CDKStack(final Construct scope, final String id, final StackProps props) {
        super(scope, id, props);

    var parameter = StringParameter.Builder.create(this, "greetings-string-parameter")
            .type(ParameterType.STRING)
            .parameterName("greet")
            .stringValue("duke")
        .build();
    
    }
}

You will need the following dependencies:


<dependency>
    <groupId>software.amazon.awscdk</groupId>
    <artifactId>aws-cdk-lib</artifactId>
    <version>2.0.0-rc.1</version>
</dependency>
<dependency>
    <groupId>software.constructs</groupId>
    <artifactId>constructs</artifactId>
    <version>10.0.0</version>
</dependency>

The aws-cdk-plain template was used as starting point of the screencast:

...and used in: Accessing AWS Systems Manager / Parameter Store's Configuration from Quarkus

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
Online Workshops
...the last 150 posts
...the last 10 comments
License