Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

diff - Amazon CloudWatch Logs

diff

Compares the log events found in your requested time period with the log events from a previous time period of equal length. This way, you can look for trends and find whether specific log events are new.

Add a modifier to the diff command to specify the time period that you want to compare with:

  • diff compares the log events in the currently selected time range to the log events of the immediately preceding time range.

  • diff previousDay compares the log events in the currently selected time range to the log events from the same time the preceding day.

  • diff previousWeek compares the log events in the currently selected time range to the log events from the same time the preceding week.

  • diff previousMonth compares the log events in the currently selected time range to the log events from the same time the preceding month.

For more information, see Compare (diff) with previous time ranges.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.