Reading in gzipped data from S3 in Ruby

Posted by Evan Zamir on Stack Overflow See other posts from Stack Overflow or by Evan Zamir
Published on 2013-10-31T21:50:41Z Indexed on 2013/10/31 21:53 UTC
Read the original article Hit count: 232

My company has data messages (json) stored in gzipped files on Amazon S3. I want to use Ruby to iterate through the files and do some analytics. I started to use the 'aws/s3' gem, and get get each file as an object:

#<AWS::S3::S3Object:0x4xxx4760 '/my.company.archive/data/msg/20131030093336.json.gz'> 

But once I have this object, I do not know how to unzip it or even access the data inside of it.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about amazon-web-services