Created
April 4, 2012 17:30
-
-
Save angelf/2304051 to your computer and use it in GitHub Desktop.
SSL bug in aws ruby-sdk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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