naftulikay / aws-env

A utility script for exporting an AWS profile as environment variables.
Other
56 stars 10 forks source link

Strip Quotes #12

Closed naftulikay closed 2 years ago

naftulikay commented 7 years ago

Apparently, as reported by @joshuajlai, if credentials files have quotes surrounding the variable values, it breaks things.

Attempt to fix this either via shlex or some regular expression magic.

cxhercules commented 7 years ago

I took a look at this as well, and problem I see is that this is not supported format as far as I can tell. No quotes are used in aws credentials file @joshuajlai.

http://docs.aws.amazon.com/cli/latest/topic/config-vars.html, does not explicitly say so but no example has quotes in there. Also https://en.wikipedia.org/wiki/INI_file does specify that ini can support quotes, but aws cli does not like quotes either and when used with --profile this is returned:

An error occurred (InvalidAccessKeyId) when calling the ListBuckets operation: The AWS Access Key Id you provided does not exist in our records.
naftulikay commented 7 years ago

@hhercules So you're saying this issue might not even be relevant due to AWS' own tool not supporting it? It might still be relevant, as per my comments forthcoming in #10.

cxhercules commented 7 years ago

Disregard and do as you wish, I was just pointing out what I saw. It is software and thus malleable.

naftulikay commented 2 years ago

16 is a complete rewrite so this is probably fixed, file a new issue if it isn't.