title: AWS CloudWatch GetMetricsData: "Sum" misses points on periods without values
body: <p>I am querying <code>GetMetricsData</code> from AWS CloudWatch:</p>
  
  <pre><code>                 {
                      StartTime: lastWeek ,
                      EndTime: today,
                      MetricDataQueries: [
                          {
                              Id: 'invocations',
                              Label: 'Invocations',
                              MetricStat: {
                                  Metric: {
                                      Dimensions: [
                                          {
                                              Name: 'FunctionName',
                                              Value: /* FunctionName */,
                                          },
                                      ],
                                      MetricName: 'Invocations',
                                      Namespace: 'AWS/Lambda'
                                  },
                                  Period: 60*60*24, // day
                                  Stat: 'Sum',
                                  Unit: 'Count',
                              },
                          },
                      ],
                  }
  </code></pre>
  
  <p>This is what I get:</p>
  
  <p><a href="https://i.stack.imgur.com/bepcG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bepcG.png" alt="enter image description here"></a></p>
  
  <p>Instead of getting data for 7 days (i.e. a week) I get 5 days. I have 2 missing days (as you can see in the graph).</p>
  
  <p>Those missing days did not have any data.</p>
  
  <p><strong>CloudWatch is not returning points which have no data</strong>. How can I make the <code>Sum</code> operation return the actual count (<code>0</code>) instead?</p>