-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
AWS_CONFIG_FILE vs. AWS_CREDENTIAL_FILE #1037
Comments
The docs are wrong, we do not support an AWS_CREDENTIAL_FILE env var. Well to be specific, we do support AWS_CREDENTIAL_FILE, but it's an older, deprecated format that is not the same thing as the shared credentials file in |
Docs have been updated, thanks again for letting us know. |
Thanks @jamesls, that's an improvement - I'm afraid the docs are still a bit confusing/misleading though, insofar they suggest what I want is possible:
To me, the phrase aws configure will write to the specified file naturally implies all information I submit (would also match the principle of least surprise). However, that's not the case, and Configuration and Credential Files seems to explain why:
Assuming this is the expected behavior indeed, could you please clarify:
|
Ah, thanks for pointing that out. I'll let our docs team know about that and get that wording updated. The A while back when we were integrating with this shared credentials file That linked issue has more info if you're interested. In the meantime, I'll get the docs updated. Thanks again. |
not supporting AWS_CREDENTIAL_FILE is a problem when we use sudo to run aws-cli, especially with users who dont have home directories (e.g. www-data). What is the right way to run aws-cli with "sudo" ? |
I've also made it local, as the [defaults used by the AWS CLI tool](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) are sane. See also [AWS_CONFIG_FILE vs. AWS_CREDENTIAL_FILE](aws/aws-cli#1037)
I agree with @sandys. It seems like a problem that you cannot point |
See AWS_SHARED_CREDENTIALS_FILE |
You need to set Ref https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#the-shared-credentials-file |
I found I had to set another variable in
|
Configuration and Credential Files within the official AWS CLI documentation differentiates between these two configuration files and resp. environment variable overrides
AWS_CONFIG_FILE
andAWS_CREDENTIAL_FILE
:AWS_CONFIG_FILE
– path to a CLI config file.AWS_CREDENTIAL_FILE
– path to an AWS credentials file.It elaborates on that in section Storing Credentials in Config:
However, other than
AWS_CONFIG_FILE
,AWS_CREDENTIAL_FILE
doesn't seem to work and exhibits the following two oddities:aws configure
withAWS_CREDENTIAL_FILE
set still yields thecredentials
file to be generated in the default location (whereasAWS_CONFIG_FILE
is obeyed)AWS_CREDENTIAL_FILE
yields 'Unable to locate credentials. You can configure credentials by running "aws configure".' again - however, after changing that location to a non existing file, boto triggers the error 'The specified config file () could not be found.' as expected, so it attempts to read the file at least❓ Any idea what's going on here, or am I missing how this is supposed to work? Thanks!
The text was updated successfully, but these errors were encountered: