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
질문됨 7년 전4176회 조회
2개 답변
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
답변함 7년 전
0

Thank you for your reply really helped me!

Osi
답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠