-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
Describe the feature
Currently you can use environment variables to change the location of some files (e.g. AWS_CONFIG_FILE) however, this still does not allow you to change the location of some files that go inside the config directory (e.g. ~/.aws/cli/alias)
it would be nice to just be able to configured where the config (e.g. ~/.aws/) directory is including all of the sub-directories and files below it.
Use Case
I might have different accounts for aws and different protocols and use-cases which I don't want to share between the two. Currently, I can have an environment variable change what config file, credential file, session tokens, etc are to be used when switching my current working directory.
However, there are lots of things which I can not change (e.g. ~/.aws/cli/alias) as well it would be cleaner and easier to change the whole config directory (e.g. ~/.aws/) versus just individual files under it (e.g. ~/.aws/config)
Proposed Solution
You should be able to specify an environment variable (e.g. AWS_CLI_CONFIG_DIR [default: ~/.aws/]) which would replace all of the uses of the current things like
Line 35 in a5b944a
| os.path.join('~', '.aws', 'cli', 'alias') |
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CLI version used
aws-cli/2.17.32 Python/3.11.9 Linux/6.11.0-21-generic exe/x86_64.ubuntu.24
Environment details (OS name and version, etc.)
Ubuntu 24.04.2 LTS