I have an AWS VM that runs a daily task and generates several files. I want my Rails app to download these files and place them in a folder within the app. Is there a gem or method in Ruby that can do this?
I know how to do it in bash with s3cmd and I guess I could create a script to get them this way, but looking for a more native rails way.
I am using the data in these files for the app, but I don't want the users to be able to download them.
There is official Amazon AWS Ruby SDK: http://aws.amazon.com/sdk-for-ruby/
There is also an open source gem called Fog, that may be easier to use for simpler projects: http://fog.io/
The
aws-sdk
v2 gem provides a simple interface for downloading objects from Amazon S3.In the v1
aws-sdk
, the code to download from s3 is...