View a markdown version of this page

logcompare - 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).

logcompare

Use the logcompare command to compare the current time window against a baseline window shifted back by a specified duration.

Syntax

| logcompare timeshift duration

The command uses the following arguments:

  • timeshift duration – The duration to shift back for the baseline window (for example, 7d).

Example

The following query compares the past day's logs against the same period one week earlier.

SOURCE lg start=-1d end=now | logcompare timeshift 7d