Does anyone know of any good tutorials for using the APIs from Amazon WeB Services, namely CloudWatc
Posted
by undefined
on Stack Overflow
See other posts from Stack Overflow
or by undefined
Published on 2009-10-08T15:42:56Z
Indexed on
2010/06/10
13:02 UTC
Read the original article
Hit count: 174
Hi, I have been wrestling with Amazon's CloudWatch API with limited success. Does anyone know of any good resources (other than amazon's api docs) for using the APIs. I have tried to run them using the PHP library for CloudWatch but get nothing but error codes. I am configuring the GetMetricStatisticsSample.php file as follows:
$request = array();
$endTime = date("Y-m-d G:i:s");
$yesterday = mktime (date("H"), date("i"), date("s"), date("m"), date("d")-1, date("Y"));
$startTime = date("Y-m-d 00:00:00", $yesterday);
$request["Statistics.member.1"] = "Average";
$request["EndTime"] = $endTime;
$request["StartTime"] = $startTime;
$request["MeasureName"] = "CPUUtilization";
$request["Unit"] = "Percent";
invokeGetMetricStatistics($service, $request);
But this returns "Caught Exception: Internal Error Response Status Code: 400 Error Code: Error Type: Request ID: XML:"
I have also tried from command line as follows -
set JAVA_HOME=C:\Program Files\Java\jre1.6.0_05 set AWS_CLOUDWATCH_HOME=C:\AmazonWebServices\API_tools\CloudWatch-1.0.0.24 set PATH=%AWS_CLOUDWATCH_HOME%\bin mon-list-metrics
but get C:|Program' is not recognized as an internal or external command...
any suggestions? cheers
© Stack Overflow or respective owner