Skip to main content
Version: devel

dlt.common.configuration.providers.aws_secrets

AwsSecretsManagerProvider Objects

class AwsSecretsManagerProvider(VaultDocProvider)

View source on GitHub

__init__

def __init__(credentials: AwsCredentials,
only_secrets: bool = True,
only_toml_fragments: bool = True,
list_secrets: bool = False,
secret_name_prefix: str = "dlt/") -> None

View source on GitHub

Initialize an AWS Secrets Manager Provider to access secrets stored in AWS Secrets Manager

Arguments:

  • credentials - AWS credentials to access Secrets Manager
  • only_secrets - When True, only keys with secret hint types will be looked up
  • only_toml_fragments - When True, only load known TOML fragments and ignore other lookups
  • list_secrets - When True, list all secrets upfront to optimize vault access by avoiding lookups for non-existent secrets. Requires additional API calls and the secretsmanager:ListSecrets permission.
  • secret_name_prefix - Prepended verbatim to all secret names and used to filter secret listing so dlt secrets are namespaced in a vault shared with other services. Defaults to dlt/, set to an empty string to look up unprefixed secret names.

get_key_name

@staticmethod
def get_key_name(key: str, *sections: str) -> str

View source on GitHub

Makes key name for the secret by joining normalized components with /

AWS secret names may contain letters, numerals and /_+=.@- characters. Punctuation other than - and _ is removed from name components so the separator cannot appear inside them.

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.