0
votes

Using python in an aws lambda I want to retrieve a parameter from the ssm parameter store then modify it.

So I can retrieve it easily like this

ssm = boto3.client('ssm')
    parameter = ssm.get_parameter(Name='/my_test/test', WithDecryption=True)

How can I use the client to update the string value of this parameter?

if((parameter['Parameter']['Value']) == 'ONE_STRING'):
   // can i update the parameter value here?
1

1 Answers

0
votes

Solved with the following code

if((parameter['Parameter']['Value']) == 'ONE_STRING'):
    ssm.put_parameter(
         Name='/my_test/test',
         Value='NEW_STRING',
         Type='String',
         Overwrite=True
       )