[feat] Use `credentials_file` variable in config file
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 4.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 13
Description
### Describe the feature
I want to keep user secrets separate from config.
Secrets file at custom path `/home/me/.secrets/aws/credentials`:
```ini
[default]
aws_access_key_id=foo
aws_secret_access_key=bar
```
Config file at default path `/home/me/.aws/config`:
```ini
[default]
region=us-east-1
credentials_file=/home/me/.secrets/aws/credentials
```
I assumed I can use `credentials_file` as it's in [the docs](https://github.com/aws/aws-cli/tree/v2?tab=readme-ov-file#other-configurable-variables). However that doesn't work:
> Unable to locate credentials. You can configure credentials by running "aws configure".
Please let us use `credentials_file` as a variable in the config file.
### Use Case
- To keep secrets and config separate
- To keep secrets in well-known location
- Plays nice with other tools
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CLI version used
2.18.1
### Environment details (OS name and version, etc.)
ubuntu 22.04
Contributor guide
Research direction
Start with the linked AWS CLI documentation and the configuration and secrets-file examples in the issue. Reproduce the failure using the listed paths and AWS CLI 2.18.1 on Ubuntu 22.04, then trace the configuration and credential-loading entry points. Done means a credentials_file value in /home/me/.aws/config is honored and credentials are located from the custom path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- authentication, cli, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100