View a markdown version of this page

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

accum

Use the accum command to compute a running cumulative sum of a numeric field.

Syntax

| accum field [AS out]

The command uses the following arguments:

  • field – The numeric field to accumulate.

  • AS out (Optional) – An alias for the output field.

Example

The following query computes a running total of bytes.

fields @timestamp, bytes | accum bytes AS totalBytes