# Possible to change order of key fields with S3 Output plugin?

**URL:** https://discuss.elastic.co/t/possible-to-change-order-of-key-fields-with-s3-output-plugin/221740
**Category:** Logstash
**Created:** [March 2, 2020, 4:52pm UTC](https://discuss.elastic.co/t/possible-to-change-order-of-key-fields-with-s3-output-plugin/221740 "2020-03-02T16:52:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![joshuarobinson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshuarobinson/32/55776_2.png) [@joshuarobinson](https://discuss.elastic.co/u/joshuarobinson)
#### Post date: [March 2, 2020, 4:52pm UTC](https://discuss.elastic.co/t/possible-to-change-order-of-key-fields-with-s3-output-plugin/221740/1 "2020-03-02T16:52:33Z")

</div>

Hi,

According to [https://www.elastic.co/guide/en/logstash/current/plugins-outputs-s3.html](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-s3.html), the objects created have a key with uuid _before_ the date field. This makes listing objects by date range far less efficient, for example if I want to use Spark to load just a date range subset.

Is there any way to change the order of the fields in the key prefix so that date is before the uuid?

I.e., I current have objects like this:  
**ls.s3.03210fdc-c108-4e7d-8e49-72b614366eab.2020-02-28T04.04.part28.txt**

and I would like to have:  
**ls.s3.2020-02-28T04.04.03210fdc-c108-4e7d-8e49-72b614366eab.part28.txt**

thanks in advance for any pointers.

---

<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: [March 30, 2020, 4:52pm UTC](https://discuss.elastic.co/t/possible-to-change-order-of-key-fields-with-s3-output-plugin/221740/2 "2020-03-30T16:52:44Z")

</div>

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