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?


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".

I had the same problem and for me the solution was to install version 2 of aws cli.

From the quick read it might have been caused by Python and aws version dependency mismatch.


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"
}