# Logstash s3 input plugin: not indexing files under individual folder of bucket using prefix option

**URL:** <https://discuss.elastic.co/t/logstash-s3-input-plugin-not-indexing-files-under-individual-folder-of-bucket-using-prefix-option/256313>\
**Category:** Logstash\
**Created:** [November 23, 2020, 7:34am UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-not-indexing-files-under-individual-folder-of-bucket-using-prefix-option/256313 "2020-11-23T07:34:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravi\_Kumar\_Reddy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravi_kumar_reddy/32/79490_2.png) [@Ravi\_Kumar\_Reddy](https://discuss.elastic.co/u/Ravi_Kumar_Reddy)\
**Post date:** [November 23, 2020, 7:34am UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-not-indexing-files-under-individual-folder-of-bucket-using-prefix-option/256313/1 "2020-11-23T07:34:11Z")

</div>

# s3 bucket : elk folders: syslog, errorlog etc.. filepattern: syslog-

input {  
s3 {  
access\_key\_id =\> ""  
secret\_access\_key =\> ""  
bucket =\> "elk"  
region =\> "eu-central-1"  
prefix =\> "syslog/syslog-"  
additional\_settings =\> {  
force\_path\_style =\> true  
follow\_redirects =\> false  
}  
}  
}

# output { elasticsearch { hosts =\> ["[http://localhost:9200](http://localhost:9200)"] index =\> "apache2log-%{+YYYY.MM.dd}" user =\> "" password =\> "" } }

index is happening with all the files under different folders, need to process only files under particular folder  
I tried the prefix option with the below formats, but not indexing as expected.

1. syslog
2. syslog/
3. syslog/syslog-

---

<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:** [December 21, 2020, 7:34am UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-not-indexing-files-under-individual-folder-of-bucket-using-prefix-option/256313/2 "2020-12-21T07:34:27Z")

</div>

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