Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Amazon Web Services client library for Ruby implementing the EC2, Cloud Watch, Elastic Load Balancing and Auto Scaling APIs
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
README.textile
aws.gemspec

README.textile

AWS – Amazon Web Services client library for Ruby

Currently implemented:

EC2 - EC2 API - Cloud Watch - Elastic Load Balancing - Auto Scaling

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/"
}

Something went wrong with that request. Please try again.