awsu
awsu copied to clipboard
Inconsistent profile lookup in ~/.aws/config
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
Thanks for the bugreport @janborch - I'll look into it!
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).
Sorry for the late response / reaction. Please also see the discussion here https://github.com/kreuzwerker/awsu/pull/45#issuecomment-599235037 and please give me some feedback.