Project

General

Profile

Bug #10019 ยป BucketTest.rb

wkwood (Will Wood), 07/09/2014 02:38 PM

 
1
require 'rubygems'
2
require 'aws-sdk'
3

    
4
AWS.config({:access_key_id => ENV['aws-key'],
5
            :secret_access_key => ENV['aws-secret-key'})
6
s3 = AWS::S3.new( { :region => 'us-east-1' })
7

    
8
bucket = s3.buckets[ENV['bucketName']]
9
bucket.objects.each do | ob |
10
  puts ob.key + ',' + ob.last_modified.to_date.to_s
11
end
12