Prompt
What should I use instead of plain env vars for production secrets?
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
For production secrets, use a dedicated secrets manager instead of plain environment variables.
Good options:
- AWS Secrets Manager or SSM Parameter Store
- HashiCorp Vault
- Google Secret Manager
- Azure Key Vault
- Kubernetes Secrets only if paired with strong controls; better with encryption at rest and external secret management
Why these are better than plain env vars:
- Centralized access control
- Audit logs
- Rotation support
- Encryption at rest/in transit
- Finer-grained permissions
- Easier secret lifecycle management
Best practice:
- Store secrets in a secrets manager
- Fetch them at runtime or inject them securely during deployment
- Rotate them regularly
- Give services only the minimum permissions needed
If you want, I can also recommend the best choice based on your stack, like AWS, Kubernetes, Docker, or GitHub Actions.