I am just about to start working with AWS (s3 and ec2) and I was wondering which gem is better: aws-sdk or fog?
I would say AWS-SDK. I have not used fog, but have used the AWS gem, and switched. I have found that the official support and bug fixing from the ruby person at Amazon has been pretty good. Also the code in AWS-SDK is nice and clean, and I like the approach. When AWS announces a new feature, the AWS-SDK client seems to get updated within days to support it.
I looked at fog, and immediately decided against it: a) Too many gem dependencies. b) Lowest common denominator, and c) Internal complexity, needed because it supports many different protocols.
I would say fog.
All I know is that it's the one I've been using and it's fine. It supports almost all of the AWS services except for sns I think. It might be easier to test as well, since it has mock services.
It's the one recommanded for working with carrierwave also.
Fog also seems to be well maintained.
But on the other hand, aws-sdk is done by amazon, and might become the standard.
AWS.eager_autoload!
. A pretty minor bit of effort to get around the thread-safety issue. –
Monti AWS.eager_autoload!
is only necessary if you are on Ruby 1.8/1.9, as standard autoload
is thread safe in Ruby 2. –
Chanellechaney I would say if you're only using amazon services, just use aws-sdk.
Look at the fog source code, it's awesome but also scary how many services are handled and built in the core gem: https://github.com/fog/fog/tree/master/lib/fog
Think that all those service drivers are part of your application build for nothing.
© 2022 - 2024 — McMap. All rights reserved.