Skip to content

aws_secrets_manager

mlflow_secrets_auth.providers.aws_secrets_manager

AWS Secrets Manager authentication provider.

AWSSecretsManagerAuthProvider()

Bases: SecretsBackedAuthProvider

Authentication provider using AWS Secrets Manager.

Requires the optional dependency boto3.

Environment variables

AWS_REGION: AWS region (e.g., "eu-west-1"). Required. MLFLOW_AWS_SECRET_ID: Secret identifier or ARN. Required. MLFLOW_AWS_AUTH_MODE: "bearer" (default) or "basic". MLFLOW_AWS_TTL_SEC: Cache TTL in seconds (defaults to provider's default TTL).

Initialize the provider with a default TTL and lazy AWS client.

Source code in src/mlflow_secrets_auth/providers/aws_secrets_manager.py
def __init__(self) -> None:
    """Initialize the provider with a default TTL and lazy AWS client."""
    super().__init__(PROVIDER_AWS, default_ttl=DEFAULT_TTL_SECONDS)
    self._secrets_client: Any | None = None  # boto3 client when available