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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ