What are Secrets?
Secrets are encrypted key-value pairs for storing sensitive data like API keys, database credentials, and tokens. They are scoped to your project and automatically injected into runs as environment variables.How Secrets Work
- Create a secret with a key name and value
- Secrets are encrypted at rest using AWS KMS
- Automatically injected into all runs as environment variables
- Referenced by name in data source and catalog configurations
Creating a Secret
- Navigate to Secrets in your project sidebar
- Click Create secret
- Enter a key name (e.g.,
DATABASE_URL,API_KEY) - Enter the secret value
- Click Create
Secret Key Naming
Keys must contain only:- Alphanumeric characters (
a-z,A-Z,0-9) - Dashes (
-) - Underscores (
_) - Dots (
.)
DATABASE_URL, api.key, my-secret-key, AWS_ACCESS_KEY_ID
Using Secrets
As Environment Variables
Secrets are automatically available as environment variables in your runs:In Data Sources and Catalogs
When configuring data sources and catalogs, you can reference secrets by name: S3 Data Source credentials:Security
- Encrypted at rest: All secrets use AWS KMS encryption
- Project isolation: Secrets are only accessible within their project
- Value masking: Secret values are never displayed after creation
- Audit trail: Creation and update timestamps are tracked
Best Practices
- Use descriptive names:
PROD_DATABASE_URLis better thanDB - Rotate regularly: Update secrets periodically for security
- Minimal access: Only create secrets that are needed
- Separate environments: Use different secrets for dev/staging/prod