How to list objects in a date range?
Confirm by changing [ ] to [x] below:
- [X] I've gone though Developer Guide and API reference
- [X] I've checked AWS Forums and StackOverflow for answers
Describe the question I'm looking to list all the objects stored in S3 bucket between two dates using aws s3 javascript sdk. According to ListObjects there is no parameter allowing to do that except a prefixor delimiter but in my case they are useless. Is there any solution to do that or I have to get the returned data then filter them according to LastModified?
@slim-hmidi Thank-you for reaching out to us with your issue.
You are right, unfortunately we currently don't have any params to specify a range. You can use the LastModified object returned from the list objects and write a customized function. Please reach out if you need help writing that.
@ajredniwja Thanks for your answer. I did it manually. Is there any intention to add a parameter or new api for that in the next version or there is no use case for that?
The support for an additional param has to come from the service side, so I can open a ticket with them, but due to lack of requests for this particular feature it might sit at the backlog for a while.
Interesting #3103 was opened as a feature request for this issue, but then it was closed as a duplicate. I am adding my +1 to this request. Looping through all of the filenames and then filtering by date is very slow for large buckets. We use S3 for access logs and the number of files is huge after only 3 days.
Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue.
Can we please re-open this issue? I'll need this feature soon!
Yes please, this feature could help us to improve performances. Thanks.
We would also really like to have this feature!
Yes please!
Last modified isn't very useful for us to filter by, as it doesn't always match the upload+storage date.
Ability to filter by date range would be very useful.
+1 Very much needed. How can we otherwise process files uploaded since the previous batch processing date without moving files around?
Yes, this would be very helpful for us as well.
+1
+1