1. Answers
  2. Building AWS SSM Parameters

How do I build an AWS SSM parameter?

To create an AWS SSM Parameter, we will use the AWS SSM Parameter resource. This resource allows you to store configuration data securely and reference it in your applications.

Here’s a detailed example of how to create an SSM Parameter:

  • Provider: We specify the AWS provider with the necessary region and credentials.
  • SSM Parameter Resource: We define an SSM parameter to store a piece of configuration data, such as a database connection string or an API key.

Below is a complete example of how to create an AWS SSM Parameter:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

// Create an SSM parameter
const example = new aws.ssm.Parameter("example", {
    name: "/example/parameter",
    type: aws.ssm.ParameterType.String,
    value: "example_value",
    tags: {
        Environment: "example_environment",
    },
});
export const ssmParameterName = example.name;

In this example:

  1. We configure the AWS provider to the us-west-2 region.
  2. We create an SSM Parameter named /example/parameter with a type String and a value of example_value.
  3. We tag the parameter with an environment label for easier management.
  4. We export the name of the SSM Parameter as a stack output for reference.

This setup allows you to securely store and manage configuration data in AWS, leveraging the capabilities of AWS Systems Manager Parameter Store.

Deploy this code

Want to deploy this code? Sign up for a free Pulumi account to deploy in a few clicks.

Sign up

New to Pulumi?

Want to deploy this code? Sign up with Pulumi to deploy in a few clicks.

Sign up