Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update AWS Secrets Manager via python?

I can't find any documentation on how to upload/update values to the AWS secrets manager. I can only retrieve the values via python. Is there a workaround on this?

like image 744
Woootiness Avatar asked Dec 23 '22 20:12

Woootiness


1 Answers

You can use update_secret():

response = client.update_secret(
    SecretId='string',
    ClientRequestToken='string',
    Description='string',
    KmsKeyId='string',
    SecretBinary=b'bytes',
    SecretString='string'
)

For creating new secrets, use: put_secret_value()

like image 154
John Rotenstein Avatar answered Dec 25 '22 08:12

John Rotenstein