# Logstash s3 input .gz/folder/file patter possible?

**URL:** <https://discuss.elastic.co/t/logstash-s3-input-gz-folder-file-patter-possible/319493>\
**Category:** Logstash\
**Created:** [November 21, 2022, 8:16pm UTC](https://discuss.elastic.co/t/logstash-s3-input-gz-folder-file-patter-possible/319493 "2022-11-21T20:16:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![acavalier](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@acavalier](https://discuss.elastic.co/u/acavalier)\
**Post date:** [November 21, 2022, 8:16pm UTC](https://discuss.elastic.co/t/logstash-s3-input-gz-folder-file-patter-possible/319493/1 "2022-11-21T20:16:51Z")

</div>

I want the s3 input to read the .gz/folder/file is this possible or will i need to use somthing else i.e. lambda to extract the files first. Currently the s3 input is reading the folder as the file. Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [November 21, 2022, 8:52pm UTC](https://discuss.elastic.co/t/logstash-s3-input-gz-folder-file-patter-possible/319493/2 "2022-11-21T20:52:17Z")

</div>

> [@acavalier](#):
>
> I want the s3 input to read the .gz/folder/file is this possible

Absolutely. The input will [read](https://github.com/logstash-plugins/logstash-input-s3/blob/b7f42d7cd7c09b5343e5e60fe2bd7971f039eecd/lib/logstash/inputs/s3.rb#L292) as gzip any file that matches the [gzip\_pattern](https://github.com/logstash-plugins/logstash-input-s3/blob/b7f42d7cd7c09b5343e5e60fe2bd7971f039eecd/lib/logstash/inputs/s3.rb#L89) (default value ".gz(ip)?$").

---

<div class="post-metadata">

**Author:** ![acavalier](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@acavalier](https://discuss.elastic.co/u/acavalier)\
**Post date:** [November 21, 2022, 9:10pm UTC](https://discuss.elastic.co/t/logstash-s3-input-gz-folder-file-patter-possible/319493/3 "2022-11-21T21:10:40Z")

</div>

> [@Badger](#):
>
> file that matches

My issue is that im getting folder from the file.gz/folder/logfile path, when i want logfile.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [November 21, 2022, 9:14pm UTC](https://discuss.elastic.co/t/logstash-s3-input-gz-folder-file-patter-possible/319493/4 "2022-11-21T21:14:29Z")

</div>

> [@acavalier](#):
>
> My issue is that im getting folder from the file.gz/folder/logfile path, when i want logfile.

I do not understand what you mean by that.

---

<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 19, 2022, 9:15pm UTC](https://discuss.elastic.co/t/logstash-s3-input-gz-folder-file-patter-possible/319493/5 "2022-12-19T21:15:02Z")

</div>

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