Is it possible to inject environment variables (from a file) in lein process? I am using Emacs and Cider. At the moment I have to type them manually to alter lein command. C-u M-x cider-jack-in-clj.
https://github.com/weavejester/environ may be one way of managing that.
emacs facilities like https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html or https://develop.spacemacs.org/doc/DOCUMENTATION.html#managing-environment-variables-by-yourself may be other options
We use lein-environ. I didn’t know it can update env variables.
It doesn't exactly do that, it provides an interface for reading environmental variables with a set of overrides (which may be good enough for you, I'm not sure what you're trying to do). If you're trying to make sure those env vars are getting passed along to subprocesses that you're kicking off, you'll probably want to set them via https://docs.oracle.com/javase/7/docs/api/java/lang/ProcessBuilder.html.
I need to use a different AWS key for some projects. AWS client doesn’t use environ unfortunately.
I sense that https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html might help up to a point, that way, the bulk of the per-project stuff doesn't have to be dumped into larger files. Activating an aws profile on a per-dir basis should be easy with emacs.