# Listing all files in S3 everytime new file is added

**URL:** https://discuss.elastic.co/t/listing-all-files-in-s3-everytime-new-file-is-added/203102
**Category:** Logstash
**Created:** [October 10, 2019, 6:57pm UTC](https://discuss.elastic.co/t/listing-all-files-in-s3-everytime-new-file-is-added/203102 "2019-10-10T18:57:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![user2416](https://avatars.discourse-cdn.com/v4/letter/u/97f17d/32.png) [@user2416](https://discuss.elastic.co/u/user2416)
#### Post date: [October 10, 2019, 6:57pm UTC](https://discuss.elastic.co/t/listing-all-files-in-s3-everytime-new-file-is-added/203102/1 "2019-10-10T18:57:58Z")

</div>

Hi,

We are using logstash to read logs from S3, we have millions of files in S3 bucket for Cloudtrail logs. When a new file is added, logstash is listing all files first and then reading the logs from new file, its taking very long time to list all files as there are many. is there any solution for this issue?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 7, 2019, 6:58pm UTC](https://discuss.elastic.co/t/listing-all-files-in-s3-everytime-new-file-is-added/203102/2 "2019-11-07T18:58:00Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
