How do I get the most recent Cloudwatch metric data for an instance using Boto?
问题 I'm trying to get the most recent data for CPU utilization for an instance (actually, several instances, but just one to start with), however the following call doesn't return any data: cw = boto.cloudwatch.connect_to_region(Region) cw.get_metric_statistics( 300, datetime.datetime.now() - datetime.timedelta(seconds=600), datetime.datetime.now(), 'CPUUtilization', 'AWS/EC2', 'Average', dimensions={'InstanceId':['i-11111111']} # for stats across multiple instances: # dimensions={'InstanceId':[