Skip to content
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

Inconsistent profile lookup in ~/.aws/config #36

Open
janborch opened this issue May 8, 2019 · 3 comments
Open

Inconsistent profile lookup in ~/.aws/config #36

janborch opened this issue May 8, 2019 · 3 comments
Labels

Comments

@janborch
Copy link

janborch commented May 8, 2019

Found two inconsistencies in loading the the AWS CLI configufration from ~/.aws/config file.

Problem 1:

The default location for the AWS CLI config file is ~/.aws/credentials but should be ~/.aws/config

> awsu –help

…
-c, --config-file string               sets the config file (default "/Users/borchj/.aws/credentials")

I fixed the problem by adding parameter -c ~/.aws/config but it's a bit cumbersome to add this to each invocation.

Problem 2:

According to the AWS doc https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html, profiles in the config file should be prefixes by profile.
For example:

[profile user1]
region=us-east-1

awsu returns an error message : no such profile "user1" configured

awsu find the profile if you remove the ‘profile’ prefix.

[user1]
region=us-east-1
@yawn yawn added the bug label May 8, 2019
@yawn
Copy link
Contributor

yawn commented May 8, 2019

Thanks for the bugreport @janborch - I'll look into it!

@yawn
Copy link
Contributor

yawn commented Oct 15, 2019

Currently awsu actually treats both locations as one and the same since for historical reasons they were just symlinked to one file (on my machine). I'll fix it in the release after this one (for Catalina).

@yawn
Copy link
Contributor

yawn commented Mar 15, 2020

Sorry for the late response / reaction. Please also see the discussion here #45 (comment) and please give me some feedback.

gesellix pushed a commit to gesellix/awsu that referenced this issue Sep 3, 2020
This respects the format here:
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html

It also allows using export AWS_PROFILE=<profile> before using `awsu`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants