Skip to content

Update SSM parameter in a different stack than the creation. Using AWS CDK

0

Hi,

I would like to create an SSM parameter with a dummy value in one stack and update it with Lambda function name, after the lambda is created in a different stack. I have tried using ssm.putParameter (ssm from aws-sdk). using custom resource. But it did not work as expected. Is there any other way that I can try to make this happen? Please let me know if you want more information.

Thanks, Indu.

asked a year ago423 views
1 Answer
1

Hi, you have to use the overwrite option of the Put Parameter API of SSM to do an update. Example with CLI: ssm put-parameter --name "test123" --type "String" --value "MyValue" --overwrite

See reference doc: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/put-parameter.html

You will also find this option with any language SDK published by AWS as it is delivered by the service endpont API: https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PutParameter.html

Best,

Didier

EXPERT
answered a year ago
EXPERT
reviewed a year ago
AWS
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.