Skip to main content

Parameter

caution

This is the SST v1.x Constructs doc. SST v2 is now released. If you are using v2, see the v2 Constructs doc. If you are looking to upgrade to v2, check out the upgrade steps.

The Config.Parameter construct is a higher level CDK construct that makes it easy to create environment variables in the app.

Examples

import { Config, Topic } from "@serverless-stack/resources";

const topic = new Topic(stack, "USER_UPDATED");

new Config.Parameter(stack, "USER_UPDATED_TOPIC_NAME", {
value: topic.topicName,
});

Constructor

new Config.Parameter(scope, id, props)

Parameters

ParameterProps

value

Type : string

Value of the parameter

Properties

An instance of Parameter has the following properties.

id

Type : string

name

Type : string

value

Type : string

Methods

An instance of Parameter has the following methods.

create

static create(scope, parameters)

Parameters