A helper function for setting environment variables from AWS secret manager
Project description
django-aws-secrets-env-setup
This is a helper function to set up environment variables from AWS secrets manager.
The main function to use is set_env_variables(default_region_name, stop_on_failure=False, **kwargs)
.
In addition to default_region_name
and stop_on_failure
, there are several kwargs that can be passed.
Parameters
- If
os.environ[region_name_env_name]
is not set, thedefault_region_name
will be used as the region name instead.region_name_env_name
is the name of the environment variable to check for the region name.- Default:
'SECRETS_REGION_NAME'
- Default:
stop_on_failure
is a flag to indicate whether or not errors should be fatal. It is strongly recommended for this to be set to True in a production environment.secrets_name
is the name of the secret to pull secrets from.- Default:
os.environ[secrets_name_env_name]'
secrets_name_env_name
is the name of the environment variable to use ifsecrets_name
is not in kwargs.- Default:
'SECRETS_NAME'
- Default:
- Default:
aws_access_key_id
is the ID of the AWS access key to be used.- Default:
os.environ[aws_access_key_id_env_name]'
aws_access_key_id_env_name
is the name of the environment variable to use ifaws_access_key_id
is not in kwargs.- Default:
'AWS_ACCESS_KEY_ID'
- Default:
- Default:
aws_secret_access_key
is the AWS key used to access the secrets.- Default:
os.environ[aws_secret_access_key_env_name]'
aws_secret_access_key_env_name
is the name of the environment variable to use ifaws_secret_access_key
is not in kwargs.- Default:
'AWS_SECRET_ACCESS_KEY'
- Default:
- Default:
service_name
is the service name of the secrets manager to connect to.- Default:
'secretsmanager'
- Default:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-aws-secrets-env-setup-0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c8518933027d6ac0a133c7ca275f8e8e3dd2db6bccfd7b0bfdde5ded5f6869c |
|
MD5 | 5677e5ebae9ab67ba58163bce0f70b87 |
|
BLAKE2b-256 | 9970ced885818737fc219d91a8e716e0527c4f039fb31c5fb7c20b0c21cc1ec1 |
Close
Hashes for django_aws_secrets_env_setup-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c356d698ff93e40031f68b92c7fc62cda160965167ac68b3e4d26d53b57bc34e |
|
MD5 | 28c5af0028beb19351274c7e0268fafc |
|
BLAKE2b-256 | 5ef692e67639dd485fee792c5280be54f97d6710249ed0c29baaf5d4cbdc6143 |