This plugin registers an OmegaConf custom resolver for AWS Secrets Manager, enabling secure lazy-loaded secret injection into Hydra configurations.
pip install mxm-scaffold[aws_secrets]pip install boto3database:
password: "${aws_secret:secret_name, key_name}"
host: "prod-db.example.com"secret_id: The name or ARN of the secret in AWS Secrets Managerkey(optional): If the secret is JSON-formatted, extract this specific key from it
api:
token: "${aws_secret:prod/api/token}"database:
password: "${aws_secret:prod/db/credentials, password}"
username: "${aws_secret:prod/db/credentials, username}"- Lazy Evaluation: Secrets are fetched only when accessed, not at config load time
- No Hardcoded Values: Config files show only the resolver string, never the actual secret
- Automatic Registration: The plugin auto-registers on Hydra initialization
- JSON Support: Extract specific keys from JSON-formatted secrets
- Type Safe: Proper error messages for misconfiguration