Control command output from the Amazon CLI - Amazon Command Line Interface
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

This documentation is for Version 1 of the Amazon CLI only. For documentation related to Version 2 of the Amazon CLI, see the Version 2 User Guide.

Control command output from the Amazon CLI

This section describes the different ways to control the output from the Amazon Command Line Interface (Amazon CLI). Customizing the Amazon CLI output in your terminal can improve readability, streamline scripting automation and provide easier navigation through larger data sets.

The Amazon CLI supports multiple output formats, including json, text, and table. Some services have server-side pagination for their data.

Lastly, the Amazon CLI has both server-side and client-side filtering that you can use individually or together to filter your Amazon CLI output. Server-side filtering is processed first and returns your output for client-side filtering. Server-side filtering is supported by the service API. Client-side filtering is supported by the Amazon CLI client using the --query parameter.

Server-side vs client-side output options

Server-side output options are features directly supported by the Amazon Web Service API. Any data that is filtered or paged out is not sent to the client, which can speed up HTTP response times and improve bandwidth for larger data sets.

Client-side output options are features created by the Amazon CLI. All data is sent to the client, then the Amazon CLI filters or pages the content displayed. Client-side operations do not save on speed or bandwidth for larger datasets.

When server-side and client-side options are used together, server-side operations are completed first and then sent to the client for client-side operations. This uses the potential speed and bandwidth savings of server-side options, while using additional Amazon CLI features to get your desired output.