Can't start latest AWS CLI on Windows (malformed path to config file)

1

I've just just installed the latest AWS CLI x64 on Windows 10, from file AWSCLI64.msi . Then I have set the PATH variable as required.
When I launch aws, I get the following error:

C:\Users\Sergio>aws --version
Traceback (most recent call last):
  File "aws", line 27, in <module>
  File "aws", line 23, in main
  File "awscli\clidriver.pyc", line 55, in main
  File "awscli\clidriver.pyc", line 63, in create_clidriver
  File "botocore\session.pyc", line 386, in full_config
  File "botocore\configloader.pyc", line 152, in raw_config_parse
botocore.exceptions.ConfigParseError: Unable to parse config file: C:\Users\Sergio/.aws/credentials

The last line clearly suggests the cause, as the path to credentials file is malformed for Windows: C:\Users\Sergio/.aws/credentials
indeed, it should be: C:\Users\Sergio.aws\credentials

Hence, I've set the env variable AWS_CREDENTIAL_FILE=C:\Users\Sergio\.aws\credentials , then opened a new cmd.exe window, but I still get the same error.

I've also tried the command:

aws configure

but the same error occurs too. It seems aws.exe cannot start in any way on Windows.

What should I do ?
(and please, let AWS fix this bug !)

Tags: cli windows configparseerror

sarzen
posta 7 anni fa4176 visualizzazioni
2 Risposte
2

I have just discovered that the error is due to an invalid format of .aws\credentials file content.
It can be solved by editing the file and placing there proper credentials, following the format shown here:
Link: http://docs.aws.amazon.com/cli/latest/userguide/cli-config-files.html

Anyway, to get a useful tip which addressed me to the resolution, I had to uninstall AWSCLI from its MSI installer package and then reinstall it using pip:

pip install awscli --upgrade --user

After some more troubleshoot of PATHs, I ran aws again and I got a more meaningful error message, which addressed me to the resolution above.

sarzen
con risposta 7 anni fa
0

Thank you for your reply really helped me!

Osi
con risposta 3 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande