Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aws cli has no output

I've been using aws cli on this laptop for a while to interact with s3 buckets. Suddenly, the tool has stopping printing any output whatsoever:

C:\>aws

C:\>aws --debug

C:\>aws --help

C:\>where aws
C:\Users\Andrew\AppData\Roaming\Python\Python37\Scripts\aws
C:\Users\Andrew\AppData\Roaming\Python\Python37\Scripts\aws.cmd

This is in an administrator command prompt, but it's the same in an admin powershell prompt. Windows version 10.0.18362 Build 18362 - I took the anniversary update a few weeks ago but am not sure if it's correlated or not.

aws cli on my other (Win 10, anniversary update) machine, using the same authentication, works fine.

I've tried straight-up uninstalling and reinstalling aws cli, but after the reinstall I can't even get it to print anything to authenticate me.

Any ideas? Any more information I can give you?

like image 867
tenpn Avatar asked Apr 14 '26 00:04

tenpn


2 Answers

For anyone stumbling across this, it seems that certain v2 versions (2.2.7 in my case) fail silently if less isn't installed.

In these cases, setting AWS_PAGER to an empty string should fix the problem.

Later AWS CLI versions (e.g. 2.2.18) are decidedly more helpful:

aws sts get-caller-identity

Unable to redirect output to pager. Received the following error when opening pager:
[Errno 2] No such file or directory: 'less'

Learn more about configuring the output pager by running "aws help config-vars".
like image 114
soulshake Avatar answered Apr 15 '26 12:04

soulshake


I also faced the same issue. It was like:

$aws sts get-caller-identity

Unable to redirect output to pager. Received the following error when opening pager:
[Errno 2] No such file or directory: 'less'

Learn more about configuring the output pager by running "aws help config-vars".

And the solution is yum install less or apt-get install less. After that, it will show the proper status, like:

{
    "UserId": "AIDASAMPLEUSERID",
    "Account": "123456789012",
    "Arn": "arn:aws:iam::123456789012:user/DevAdmin"
}
like image 29
More_Bubbles Avatar answered Apr 15 '26 13:04

More_Bubbles



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!