title: Can I post an incrementing number to CloudWatch and have it compute the delta?
body: <p>We have a statistic coming from a third party tool that is running on our servers. We want to post this statistic to cloud watch every 5 minutes. The stat is an incrementing number. We have no control over getting this number or the fact that it is incrementing. </p>
  
  <p>The stat is basically, "number of dropped messages". </p>
  
  <p>We want to be able to alarm whenever for a period of 15 minutes, if the number of dropped messages is greater than a certain threshold. </p>
  
  <p>In order to do this with CloudWatch, we have been maintain state over what the past stat was and subtract this from the current stat, in order to compute the difference (the number of dropped messages since the last time we posted the metric) and then post the difference to CloudWatch</p>
  
  <p>Is there a way to post the raw numbers to CloudWatch and have CloudWatch figure out the difference?</p>
  
  <p>So let's say these are our metrics:</p>
  
  <pre><code>12:00 - 0 -&gt; post to cloud watch "0" 
  12:05 - 2225 -&gt; post to cloud watch "225"
  12:10 - 3350 -&gt; post to cloud watch "1135"
  12:15 - 7700 -&gt; post to cloud watch "4350"
  </code></pre>
  
  <p>Instead of computing the difference since the last metric, can we just post 2000, 2225, 3350 and 7700, and be able to place an alarm on the difference between two periods? </p>