exportconsthandler = async () => { // Set a parameter constversion = awaitsetParameter('/my-parameter', { value:'my-value' }); };
Overwriting a parameter
By default, the provider will not overwrite a parameter if it already exists. You can force the provider to overwrite the parameter by using the overwrite option.
Set a parameter in AWS Systems Manager Parameter Store.
Basic Usage
Example
Overwriting a parameter
By default, the provider will not overwrite a parameter if it already exists. You can force the provider to overwrite the parameter by using the
overwrite
option.Example
Extra SDK options
When setting a parameter, you can pass extra options to the AWS SDK v3 for JavaScript client by using the sdkOptions parameter.
Example
This object accepts the same options as the AWS SDK v3 for JavaScript
PutParameterCommandInput
interface.For greater flexibility such as configuring the underlying SDK client used by built-in providers, you can use the SSMProvider utility.
Options
You can customize the storage of the value by passing options to the function:
value
- The value of the parameter, which is a mandatory option.overwrite
- Whether to overwrite the value if it already exists (default:false
)description
- The description of the parameterparameterType
- The type of the parameter, can be one ofString
,StringList
, orSecureString
(default:String
)tier
- The parameter tier to use, can be one ofStandard
,Advanced
, andIntelligent-Tiering
(default:Standard
)kmsKeyId
- The KMS key id to use to encrypt the parametersdkOptions
- Extra options to pass to the AWS SDK v3 for JavaScript clientFor more usage examples, see our documentation.
See
https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parameters/