AWS – Amazon Web Services client library for Ruby
Currently implemented:
Usage
Simply provide your amazon access key and amazon secret key to start making calls:
client = AWS::EC2::Client.new(
:access_key_id => ACCESS_KEY_ID,
:secret_access_key => SECRET_ACCESS_KEY
)
client.describe_regions
=> {"regionInfo"=>{
"item"=>[
{"regionName"=>"eu-west-1", "regionEndpoint"=>"eu-west-1.ec2.amazonaws.com"},
{"regionName"=>"us-east-1", "regionEndpoint"=>"us-east-1.ec2.amazonaws.com"}
]
},
"requestId"=>"c6b5e7b4-421d-4484-932c-dcf32e66a2ab",
"xmlns"=>"http://ec2.amazonaws.com/doc/2009-04-04/"
}
You can also specify a region to make calls in a specific region:
client = AWS::EC2::Client.new( :access_key_id => ACCESS_KEY_ID, :secret_access_key => SECRET_ACCESS_KEY, :region => 'eu-west-1' ) client.describe_availability_zones
=> {"availabilityZoneInfo"=>{
“item”=>[
{"zoneName"=>"eu-west-1a", “regionName”=>"eu-west-1", “zoneState”=>"available"},
{"zoneName"=>"eu-west-1b", “regionName”=>"eu-west-1", “zoneState”=>"available"}
]
},
“requestId”=>"ed31f360-bb07-4417-b976-5f5bd1740e6e",
“xmlns”=>"http://ec2.amazonaws.com/doc/2009-04-04/"
}