-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The cli should respect XDG spec for config and credential file storage #9031
Comments
I'll mark this as a feature request. It will require some discussion. |
It should also respect the XDG cache folder when assuming role. |
Good Morning! We're closing this issue here on GitHub, as part of our migration to UserVoice for feature requests involving the AWS CLI. This will let us get the most important features to you, by making it easier to search for and show support for the features you care the most about, without diluting the conversation with bug reports. As a quick UserVoice primer (if not already familiar): after an idea is posted, people can vote on the ideas, and the product team will be responding directly to the most popular suggestions. We’ve imported existing feature requests from GitHub - Search for this issue there! And don't worry, this issue will still exist on GitHub for posterity's sake. As it’s a text-only import of the original post into UserVoice, we’ll still be keeping in mind the comments and discussion that already exist here on the GitHub issue. GitHub will remain the channel for reporting bugs. Once again, this issue can now be found by searching for the title on: https://aws.uservoice.com/forums/598381-aws-command-line-interface -The AWS SDKs & Tools Team This entry can specifically be found on UserVoice at: https://aws.uservoice.com/forums/598381-aws-command-line-interface/suggestions/33168373-the-cli-should-respect-xdg-spec-for-config-and-cre |
Based on community feedback, we have decided to return feature requests to GitHub issues. |
Hi there. Any news on this one? |
Yeah, this isn't so much a 'feature request' as a bug report. the XDG spec has been defined and adopted for some number of years now. |
AWS team: is this a feature you'd consider merging if somebody contributed the code? |
Here's a workaround until someone sends a patch:
For some reason terraform doesn't like the |
It's almost end of 2019, sad to see that the XDG settings are not being recognized on a more wide basis across applications. |
Not to mention the fact that it's very discouraging to anyone potentially motivated to offer a patch when there are PRs sitting dormant for years providing things as simple as documentation improvements. |
Should the There are much users which makes usage of dotfiles repositories. Normally the Maybe the credentials should be stored in |
I agree, many users include the whole Is there any updates on this feature request? |
In all honesty, credentials should not be stored in a plain-text file in a well-known location really. You might want to consider something like I'm not against opposed to using |
I've seen a few more requests for this change. While I do not disagree with this convention, this would be a big breaking change to many users who rely on the current configuration settings. In order to make this work, this convention would need to be adhered to by all AWS SDKs and tools. Because of this, I'm going to move this issue to the AWS SDK issue tracking repository at https://github.com/aws/aws-sdk. |
This is still an issue. What's worse, there doesn't seem to be an environment variable for configuring |
I have a couple of dozen configurations in my dotfiles and aws-cli and terraform.d are the only ones that don't comply with the XDG specification. |
Still an issue in 2022 |
@devnoot You can actually do this by adding these variables to your
|
That gets it closer but the cli still creates cache files in |
It's nice that a workaround of setting AWS-specific environment variables almost achieves the desired effect, but a major part of following the specification is that I don't have to explicitly tell each application in its own particular dialect where I want my stuff. |
Anyone know how to get the |
Indeed. It merely moves the clutter from the home directory to the shell environment. |
Will a PR for this be considered, with the precedence of, use first found:
And similar approaches for the other sections such as credentials and other files mentioned above. A clear answer on this is important so that someone can actually put in the effort and this is eventually merged and this issue closed. |
I usually see those sort of locations the other way around in precedence. I think that makes sense as it would be less likely to confuse people who don't know about the XDG spec and are following older tutorials. |
Hi 👋
I’ve seen this argument many times for other apps and I fail to understand the reasoning. It’s always possible to default all undefined |
Still broken in
|
this is the most laughably infuriating aspect to this issue - despite the fact I've already got 4 (5!?) lines in my .bashrc dedicated to pulling aws cli into line, it's all for naught because apparently this is a "breaking change to many users who rely on the current configuration settings". My options now are splitting my aws folders across multiple directories or just sucking it up? Is that really where we've landed? @gui-don is completely on the money and I couldn't agree more, there's multiple ways this could be handled gracefully for existing users, with hundreds of examples of implementations like this in the wild. |
Transferring issue back to original repository for tracking going forward. |
The XDG spec defines where config files and credential files should be placed.
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Instead of writing to $HOME, the aws config directory should be
$XDG_CONFIG_HOME/aws
. (And$XDG_DATA_HOME/aws/
for creds)The text was updated successfully, but these errors were encountered: