# Logstash s3 input plugin specify dynamic prefix

**URL:** <https://discuss.elastic.co/t/logstash-s3-input-plugin-specify-dynamic-prefix/243353>\
**Category:** Logstash\
**Created:** [July 31, 2020, 12:35pm UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-specify-dynamic-prefix/243353 "2020-07-31T12:35:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Orest\_Gulman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/orest_gulman/32/46463_2.png) [@Orest\_Gulman](https://discuss.elastic.co/u/Orest_Gulman)\
**Post date:** [July 31, 2020, 12:35pm UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-specify-dynamic-prefix/243353/1 "2020-07-31T12:35:52Z")

</div>

Hi.  
I would like to use a dynamicaly changing path in prefix based on the current month and year, `prefix => "elasticloadbalancing/region/YYYY/MM"`

```
input {
  s3 {
    access_key_id => ""
    secret_access_key => "38/"
    bucket => "elb"
    prefix => "elasticloadbalancing/region/YYYY/MM"
    type => "aws-elb"
  }
}

```

Is it somehow possible to achieve?  
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:** [August 28, 2020, 12:35pm UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-specify-dynamic-prefix/243353/2 "2020-08-28T12:35:53Z")

</div>

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