It is not possible to retrieve actual data points from Amazon CloudWatch.
Instead, CloudWatch provides aggregated metrics over a period of time (eg Average, SampleCount, Sum).
From the CloudWatch documentation:
Amazon CloudWatch aggregates statistics according to the period length that you specify in calls to GetMetricStatistics
. You can publish as many data points as you want with the same or similar time stamps. CloudWatch aggregates them by period length when you get statistics about those data points with GetMetricStatistics
.
However, as you point out, CloudWatch should be returning multiple values over the given time period.
I took your command and ran it against one of my Instances. I found that, by extending the time range, I could get multiple values returned:
{
"Datapoints": [
{
"Timestamp": "2016-08-08T22:52:00Z",
"Maximum": 0.0,
"Unit": "Percent"
},
{
"Timestamp": "2016-08-08T22:47:00Z",
"Maximum": 0.17,
"Unit": "Percent"
},
{
"Timestamp": "2016-08-08T22:42:00Z",
"Maximum": 0.16,
"Unit": "Percent"
},
{
"Timestamp": "2016-08-08T22:37:00Z",
"Maximum": 0.17,
"Unit": "Percent"
}
],
"Label": "CPUUtilization"
}
Notice that my data points were coming back only every 5 minutes. This is because standard monitoring of Amazon EC2 instances only captures metrics every 5 minutes. To obtain metrics at 1-minute intervals, you will need to Enable Detailed Monitoring. (Additional charges apply.)