# Multipile s3 plugin inputs with different prefix

**URL:** https://discuss.elastic.co/t/multipile-s3-plugin-inputs-with-different-prefix/125843
**Category:** Logstash
**Created:** [March 28, 2018, 3:27am UTC](https://discuss.elastic.co/t/multipile-s3-plugin-inputs-with-different-prefix/125843 "2018-03-28T03:27:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![eugene-marchenko](https://avatars.discourse-cdn.com/v4/letter/e/c68b51/32.png) [@eugene-marchenko](https://discuss.elastic.co/u/eugene-marchenko)
#### Post date: [March 28, 2018, 3:27am UTC](https://discuss.elastic.co/t/multipile-s3-plugin-inputs-with-different-prefix/125843/1 "2018-03-28T03:27:57Z")

</div>

Hey!

I just wondering if it's a bug or feature.  
my different ELBs are put logs to the same bucket but creates different prefix like:

> s3://prod-elb-logs/[elb\_name]/...

I use multiple s3 inputs with the same bucket but different prefix and only one input works:

> input {  
> s3 {  
> bucket =\> "albs-dev-logs"  
> prefix =\> "elb1/AWSLogs/\*\*\*\*\*\*\*\*\*\*/elasticloadbalancing/us-east-1/"  
> region =\> "us-east-1"  
> codec =\> plain  
> type =\> "alb1\_logs"  
> }  
> s3 {  
> bucket =\> "albs-dev-logs"  
> prefix =\> "elb2/AWSLogs/\*\*\*\*\*\*\*\*\*\*\*\*\*\*/elasticloadbalancing/us-east-1/"  
> region =\> "us-east-1"  
> codec =\> plain  
> type =\> "alb2\_logs"  
> }  
> }
> 
> output {  
> if [type] == "alb1\_logs" {  
> stdout { codec =\> rubydebug }  
> elasticsearch {  
> hosts =\> "[es-logs-dev.es.com:80](http://es-logs-dev.es.com:80)"  
> index =\> "alb1\_logs-%{+YYYY.MM.dd}"  
> manage\_template =\> true  
> template =\> "/etc/logstash/alb1\_template.json"  
> template\_overwrite =\> true  
> template\_name =\> "alb\_logs"  
> }  
> } else if [type] == "alb2\_logs" {  
> stdout { codec =\> rubydebug }  
> elasticsearch {  
> hosts =\> "[es-logs-dev.es.com:80](http://es-logs-dev.es.com:80)"  
> index =\> "alb2\_logs-%{+YYYY.MM.dd}"  
> manage\_template =\> true  
> template =\> "/etc/logstash/alb2\_template.json"  
> template\_overwrite =\> true  
> template\_name =\> "alb\_logs"  
> }  
> }  
> }

any suggestions?

thanks!

---

<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: [April 25, 2018, 3:28am UTC](https://discuss.elastic.co/t/multipile-s3-plugin-inputs-with-different-prefix/125843/2 "2018-04-25T03:28:18Z")

</div>

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