@InjectSecretString - AWS Secrets Manager

@InjectSecretString

Este elemento Decorator espera una cadena de ID del secreto y una SecretCache como primer y segundo argumento. El elemento Decorator devuelve el valor de la cadena del secreto. El nombre del secreto debe contener una cadena.

from aws_secretsmanager_caching import SecretCache from aws_secretsmanager_caching import InjectKeywordedSecretString, InjectSecretString cache = SecretCache() @InjectSecretString ( 'mysecret' , cache ) def function_to_be_decorated( arg1, arg2, arg3):