Skip to main content

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, the default_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'
  • 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 if secrets_name is not in kwargs.
        • Default: 'SECRETS_NAME'
  • 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 if aws_access_key_id is not in kwargs.
        • Default: 'AWS_ACCESS_KEY_ID'
  • 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 if aws_secret_access_key is not in kwargs.
        • Default: 'AWS_SECRET_ACCESS_KEY'
  • service_name is the service name of the secrets manager to connect to.
    • Default: 'secretsmanager'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-aws-secrets-env-setup-0.3.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-aws-secrets-env-setup-0.3.tar.gz.

File metadata

File hashes

Hashes for django-aws-secrets-env-setup-0.3.tar.gz
Algorithm Hash digest
SHA256 c776f1c622a978f646fcf7fe0ab9201c0039a0f58c49b41e1dbfc2ddbef636d3
MD5 587ca8c6bea7d3330a607727dd468d19
BLAKE2b-256 9b2c608046312075b0d313362217cbe0da06ae93c96cb1154855f5e7a1f63908

See more details on using hashes here.

File details

Details for the file django_aws_secrets_env_setup-0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_aws_secrets_env_setup-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 34c61a08985dec0e95bcd52bff178298e3fe2e15a8d90be6fd78a21b8961c709
MD5 f2a78654a1933530719d2bd69fd0819e
BLAKE2b-256 5dde24acc0ee71015961f3f3626ee8fd418d3b57b28653ffe8b3decbe9fda06f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page