@InjectSecretString - AWS Secrets Manager

@InjectSecretString

This decorator expects a secret ID string and SecretCache as the first and second arguments. The decorator returns the secret string value. The secret must contain a string.

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):