Home > OS >  AWS CloudWatch - Creating a metric from different datapoints in time
AWS CloudWatch - Creating a metric from different datapoints in time

Time:12-21

Is it possible to define CW metric as the difference between the same metrics, but in two consecutive data points in time?

I need to measure how many objects has been put in an S3 bucket for a given time period, so I would use make the difference NumberOfObjects in this time window. PS: I couldn't find any "New objects" metric (which is not the same of PutRequests).

CodePudding user response:

You can use 'DIFF' function.

It returns the difference between each value in the time series and the preceding value from that time series.

Expression:

DIFF(m1)

I do not have much data to test it but in this example I had added 2 new objects and using that expression shows the new objects added that day.

enter image description here


Reference:

Functions supported for metric math

  • Related