I am using AWS CLI client to develop a custom monitoring system. The requirement is that data points needs to be overridden or overwritten, but when using:
aws cloudwatch put-metric-data
I don't see any parameter to overwrite or override a data point if it has already been published. I tested this and found that that when a data point is pushed two or more times, it doesn't overwrite it but adds it (and then you can perform sums, averages, etc.). But for this specific requirement, instead of adding the data points we need to preserve just the last point. Is there any way to do that?