I have to write a rails task for getting files from s3 bucket but my bucket have more than 1000 object.
.
#Connection codes and configures
.
bucket = AWS::S3::Bucket.find('my_bucket')
puts bucket.size
# => 1000
this code just give me 1000 objects 🙁
how can i get my all objects from s3 bucket ?
As stated in the S3 developer documentation:
The response to a REST GET Bucket operation contains the IsTruncated element which plays the role of the above mentioned indicator.
To retrieve the next set of results, using the AWS::S3 library, use the last key from the current page of results as the marker in your next request.