View a markdown version of this page

where - Amazon CloudWatch Logs
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).

where

Use the where command as an alias for the filter command. It accepts identical syntax and behavior.

Syntax

| where condition

The command uses the following arguments:

  • condition – A boolean expression identical to what the filter command accepts.

Example

The following query filters for log events containing "error".

fields @timestamp, @message | where @message like /error/