AWS CLI version 2 returns strange hash

1

I installed AWS CLI Version 2 using the package installer and now all it does when I try to access any AWS resource is:

aws s3 ls s3://myBucket/

'92b1425728de28befccb69e2f810e65f8c17e99b'

aws sqs list-queues

'92b1425728de28befccb69e2f810e65f8c17e99b'

The specific version of the CLI: aws-cli/2.2.6 Python/3.8.8 Darwin/19.6.0 exe/x86_64 prompt/off

(Forgot to mention, I am on Mac OSX Catalina 10.15.6.)

Edited by: barmzilla on May 26, 2021 8:00 AM

질문됨 3년 전1146회 조회
2개 답변
2

As per: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html

When you use a shared profile that specifies an AWS Identity and Access Management (IAM) role, the AWS CLI calls the AWS STS AssumeRole operation to retrieve temporary credentials.

These credentials are then stored (in ~/.aws/cli/cache).

You can try moving contents of ~/.aws/cli/cache/ to tmp/ and test command again.

답변함 3년 전
  • Thank you, this fix worked for me

0

Looks like this was some mess up with credentials. Not sure what aws cli was returning, hopefully not a secret key, but it starting working again once I managed to reset the default profile to use.

I also managed to print out the debug log when it was crashing:

2021-05-26 18:04:03,383 - MainThread - botocore.utils - DEBUG - Not changing URI, bucket is not DNS compatible: myBucket
2021-05-26 18:04:03,384 - MainThread - botocore.credentials - WARNING - Refreshing temporary credentials failed during mandatory refresh period.
Traceback (most recent call last):
File "botocore/credentials.py", line 305, in getitem
File "json/init.py", line 293, in load
File "json/init.py", line 357, in loads
File "json/decoder.py", line 337, in decode
File "json/decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "botocore/credentials.py", line 530, in _protected_refresh
File "botocore/credentials.py", line 671, in fetch_credentials
File "botocore/credentials.py", line 679, in _get_cached_credentials
File "botocore/credentials.py", line 697, in _load_from_cache
File "botocore/credentials.py", line 307, in getitem
KeyError: '92b1425728de28befccb69e2f810e65f8c17e99b'

답변함 3년 전

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

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

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

관련 콘텐츠