django_aws_utils.secrets_manager

Module Contents

Functions

get_secret(secret_name: str, region_name: str) → str

Gets a secret from AWS Secrets Manager.

django_aws_utils.secrets_manager.get_secret(secret_name: str, region_name: str) → str

Gets a secret from AWS Secrets Manager.

It attempts to use the instance or task credentials.

The secret is returned as text, either as the base64 representation if it’s a binary secret or as a json

Parameters
  • secret_name – The name of the secret

  • region_name – The region where the secret is stored

Returns

The secret