accum - Amazon CloudWatch Logs
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

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