Turn off the pager for AWS CLI

Disabling the AWS CLI pager can be completed in three different ways.

Disable the pager via environment variable

Setting the AWS_PAGER environment variable will disable the pager.

1
2
export AWS_PAGER=
aws s3 ls

Disable the pager via configuration

In AWS CLI V2, support for a cli_pager profile option was added. In the ~/.aws/config file, the cli_pager may be used.

1
2
[default]
cli_pager=

Disable the pager via CLI argument

A global argument named --no-cli-pager exists to disable the AWS CLI pager per command usage.

1
aws s3 ls --no-cli-pager