this is a bodged piece of code to enumerate instance state from EC2
<?php
require_once "/home/XXX/src/php-aws-sdk-1.5.3/sdk.class.php";
CFCredentials::set(array(
'testing' => array(
'key' => 'XXX',
'secret' => '+YYY+',
'default_cache_config' => ,
'certificate_authority' => false
),
// Specify a default credential set to use if there are more than one.
'@default' => 'testing'
));
$ec2 = new AmazonEC2();
$response = $ec2->describe_instances(array( "Filter" => array(array("Name"=>"instance-state-code", "Value" => "16"))));
foreach($response as $res){
var_dump( $res );
}
?>