gem install aws-sdk
git clone git://github.com/amazonwebservices/aws-sdk-for-ruby.git cd aws-sdk-for-ruby/samples/
gem install right_aws
wget -q http://pear.amazonwebservices.com/get/sdk-latest.zip mkdir -p /opt/aws/lib/ unzip sdk-latest.zip -d /opt/aws/lib/ cd /opt/aws/lib/ ln -s sdk-1.5.11 php
sudo pear channel-discover pear.amazonwebservices.com sudo pear install aws/sdk
require_once('/opt/aws/lib/php/sdk.class.php'); $rds = new AmazonRDS(array('key' => '', 'secret' => '')); echo $rds->api_version . "\n"; // 2012-07-31 echo AmazonRDS::VERSION . "\n"; // 1.5.14
$ret = $ec2->describe_instances( array( 'Filter' => array( array("Name" => "instance-state-name", "Value" => array("running", "stopped") ), // Valid Values: pending | running | shutting-down | terminated | stopping | stopped array("Name" => "instance-id", "Value" => "i-xxxxxxxx"), // インスタンスを指定する場合 array("Name" => "tag:Name", "Value" => "*.example.com"), // tagを指定する場合 ) ) );