# How to get filename from AWS logs via logstash

**URL:** <https://discuss.elastic.co/t/how-to-get-filename-from-aws-logs-via-logstash/39367>\
**Category:** Logstash\
**Created:** [January 16, 2016, 12:59am UTC](https://discuss.elastic.co/t/how-to-get-filename-from-aws-logs-via-logstash/39367 "2016-01-16T00:59:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![subbu.nv](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@subbu.nv](https://discuss.elastic.co/u/subbu.nv)\
**Post date:** [January 16, 2016, 12:59am UTC](https://discuss.elastic.co/t/how-to-get-filename-from-aws-logs-via-logstash/39367/1 "2016-01-16T00:59:04Z")

</div>

Here is my logstah configuration file. can some one help on how to get the logfile name with AWS path.

input {  
s3 {  
access\_key\_id =\> "accesscode"  
bucket =\> "bucket"  
region =\> "location"  
secret\_access\_key =\> "access key"  
type =\> "location"  
}  
}  
filter {

```
grok {
    match => { "message" => "%{COMBINEDAPACHELOG}"}
}
geoip {
    source => "clientip"
}
 seq {
    field => "seq"
  }
uuid {
target => "@uuid"

```

}

}

output {  
elasticsearch {  
index =\> "awslogs"  
}  
stdout {}  
}

---

<div class="post-metadata">

**Author:** ![subbu.nv](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@subbu.nv](https://discuss.elastic.co/u/subbu.nv)\
**Post date:** [January 19, 2016, 7:52pm UTC](https://discuss.elastic.co/t/how-to-get-filename-from-aws-logs-via-logstash/39367/2 "2016-01-19T19:52:16Z")

</div>

can someone help? i am able to index those files, but the issue is am not getting the file name and file path.

---

<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:** [July 6, 2017, 5:15am UTC](https://discuss.elastic.co/t/how-to-get-filename-from-aws-logs-via-logstash/39367/3 "2017-07-06T05:15:10Z")

</div>


