Disabling the AWS CLI pager keeps command output moving directly to the terminal, a pipe, or a redirected file instead of opening an interactive viewer. That matters in repeated admin work, shell loops, and copy-paste command runs where output needs to return immediately instead of pausing inside less or more.
In AWS CLI version 2, long terminal output can be sent to a pager. The effective pager can come from AWS_PAGER, the profile-backed cli_pager setting, or the shell's generic PAGER fallback. Setting the pager value to an empty string tells the CLI to print output normally instead of launching a pager program.
The persistent setting lives in the shared AWS CLI config file and is stored per profile, so default and named profiles can be controlled independently. A non-empty AWS_PAGER value still overrides the stored setting for the current shell, and --no-cli-pager remains the safer one-command escape hatch when the profile itself should stay unchanged.
Related: How to find the AWS CLI config file
Related: How to use environment variables in AWS CLI
Related: How to switch AWS CLI profiles
$ aws configure list-profiles default audit operations-admin
If only the default profile is in use, keep default in the following commands. Each profile stores its own cli_pager value.
$ aws configure set cli_pager "" --profile default
This is the persistent profile-backed method. The same command works for any named profile by replacing default with that profile name.
$ printf '[%s]\n' "$(aws configure get cli_pager --profile default)" []
Empty brackets confirm that cli_pager is set to an empty string rather than less, more, or another pager command.
$ sed -n '/^\[default\]/,+4p' ~/.aws/config [default] region = us-east-1 cli_pager =
$ aws configure set cli_pager "" --profile audit $ sed -n '/^\[profile audit\]/,+4p' ~/.aws/config [profile audit] region = us-east-1 output = yaml cli_pager =
Named profiles use [profile name] sections in ~/.aws/config, so disabling the pager for default does not automatically change audit, production, or any other named profile.
$ printenv AWS_PAGER less -FRX $ unset AWS_PAGER
A non-empty AWS_PAGER value overrides the stored cli_pager setting for the current shell session. Use export AWS_PAGER="" when the current shell should disable paging without editing the shared profile config.
$ aws ec2 describe-regions --generate-cli-skeleton output --region us-east-1
{
"Regions": [
{
"OptInStatus": "OptInStatus",
"Geography": [
{
"Name": "Name"
}
],
"RegionName": "RegionName",
"Endpoint": "Endpoint"
}
]
}
This command generates output locally, so it is safe for pager testing without AWS credentials or an API call. When the stored profile should stay unchanged, run the same command with --no-cli-pager instead of setting cli_pager in the config file.