9apps/elasticsearch-cloudwatch — pull request #4 by copiousfreetime (2014-01-30 04:08:37+00:00)
Title: Move the creation of the MetricDatum List inside the shards loop.

A maximum of 20 items are allowed to be placed in the PutMetricData request.
When the List is created outside the loop, if there are more than 3 indexes then
the total number of datums will be > 20 and hence cause the PutMetricData
request to be rejected.

http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_limits.html