Skip to content

Instantly share code, notes, and snippets.

@angelf
Created April 4, 2012 17:30
Show Gist options
  • Select an option

  • Save angelf/2304051 to your computer and use it in GitHub Desktop.

Select an option

Save angelf/2304051 to your computer and use it in GitHub Desktop.
SSL bug in aws ruby-sdk
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE # required or connection fails
dynamo_db = AWS::DynamoDB.new(
:access_key_id => AMAZON_ACCESS_KEY_ID,
:secret_access_key => AMAZON_SECRET_ACCESS_KEY,
:use_ssl => false)
puts dynamo_db.config.use_ssl
table = dynamo_db.tables["test_table"]
table.load_schema
# data has been pre-populated
(1..10000).each{|x|
m = Benchmark.measure {
puts items["hash:#{x}", "range:#{x}"].attributes["title"]
}
puts "Time is #{1000 * m.real}.ms"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment