Skip to content

Instantly share code, notes, and snippets.


Huy Tran huytv593

View GitHub Profile
huytv593 / all_s3_objects.rb
Created Jun 28, 2017 — forked from brianhempel/all_s3_objects.rb
List/fetch all objects in a bucket with AWS::S3 Ruby gem
View all_s3_objects.rb
# by default you only get 1000 objects at a time
# so you have to roll your own cursor
objects = []
last_key = nil
new_objects = AWS::S3::Bucket.objects(bucket_name, :marker => last_key)
objects += new_objects
You can’t perform that action at this time.