Ability to change the config (e.g. `~/.aws`) location for all of aws cli
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
https://github.com/aws/aws-cli/blob/a5b944a28a93967810e25563044450a6de7e64ce/awscli/alias.py#L35
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
Hello @isleshocky77, thanks for reaching out. This feature request and we are tracking it here: https://github.com/aws/aws-cli/issues/9031 . Although, I will bring this up to the team. If you have any other questions, please do let me know. Thanks.
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.