I am attempting to use Secrets Manager a Lambda function in AWS. Secrets a manager is used to store database credentials to Snowflake (username, password).
I managed
SecretString
or SecretBinary
secrets_client = boto3.client('secretsmanager')
secret_arn = 'arn:aws:secretsmanager:eu-west-2:xxxxxxxxxxxx:secret:dashboard/auth_token'
auth_token = secrets_client.get_secret_value(SecretId=secret_arn).get('SecretString')
SecretString
or SecretBinary
from the specified version of a secret, whichever contains content.secretsmanager:GetSecretValue
kms:Decrypt
required only if you use a customer-managed AWS KMS key to encrypt the secret. You do not need this permission to use the account's default AWS managed CMK for Secrets Manager.