Python
To use secrets in Python code, read these instructions.YAML
To use secrets in YAML files (e.g. in data integration pipelines):-
Add the following keys and values to your environment variables or as Mage secrets so that
Mage can access the AWS Secrets Manager:
AWS_ACCESS_KEY_ID
(not needed if using IAM role to authenticate)AWS_SECRET_ACCESS_KEY
(not needed if using IAM role to authenticate)AWS_DEFAULT_REGION
(orAWS_REGION_NAME
)
- Store a secret in AWS Secrets Manager.
-
Use the following syntax in your YAML file to interpolate secret values from AWS Secrets Manager:
For example: