# S3 input plugin does not recognise Glacier Flexible Retrieval

**URL:** https://discuss.elastic.co/t/s3-input-plugin-does-not-recognise-glacier-flexible-retrieval/299875
**Category:** Logstash
**Created:** [March 16, 2022, 3:02pm UTC](https://discuss.elastic.co/t/s3-input-plugin-does-not-recognise-glacier-flexible-retrieval/299875 "2022-03-16T15:02:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![banana](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@banana](https://discuss.elastic.co/u/banana)
#### Post date: [March 16, 2022, 3:02pm UTC](https://discuss.elastic.co/t/s3-input-plugin-does-not-recognise-glacier-flexible-retrieval/299875/1 "2022-03-16T15:02:56Z")

</div>

HI All,  
We have noticed that the s3 input plugin does not recognise Glacier Flexible Retrieval storage classes. The result is that logstash takes forever to process our files. We would appreciate some input on how to address this, or a fix for the problem. What would be nice would be a way to filter only for objects using the S3 Standard storage class. Many Thanks

Please see the code snippet here: [logstash-input-s3/s3.rb at main · logstash-plugins/logstash-input-s3 · GitHub](https://github.com/logstash-plugins/logstash-input-s3/blob/main/lib/logstash/inputs/s3.rb)

**As below, the code will not recognise the hard-coded value “GLACIER” as AWS now distiguishes “Glacier Flexible Retrieval (Formerly “Glacier”), which is not identified in the code.**

```auto
 elsif log.last_modified > (current_time - CUTOFF_SECOND).utc # file modified within last two seconds will be processed in next cycle
          @logger.debug('Object Modified After Cutoff Time', :key => log.key)
        elsif (log.storage_class == 'GLACIER' || log.storage_class == 'DEEP_ARCHIVE') && !file_restored?(log.object)
          @logger.debug('Object Archived to Glacier', :key => log.key)
        else
          objects << log
          @logger.debug("Added to objects[]", :key => log.key, :length => objects.length)
        end
      end

```

S3 input plugin version: **latest** (see main branch above)

---

<div class="post-metadata">

### Author: ![Chris\_FreemanHO](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_freemanho/32/97624_2.png) [@Chris\_FreemanHO](https://discuss.elastic.co/u/Chris_FreemanHO)
#### Post date: [March 30, 2022, 2:42pm UTC](https://discuss.elastic.co/t/s3-input-plugin-does-not-recognise-glacier-flexible-retrieval/299875/2 "2022-03-30T14:42:06Z")

</div>

I believe "GLACIER" is still the storage class type from an api level.

You might want to check which version of the s3 input plugin you are using with `bin/logstash-plugin list --verbose` in the command line of your logstash container. It needs to be \>3.5.0

---

<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 27, 2022, 2:42pm UTC](https://discuss.elastic.co/t/s3-input-plugin-does-not-recognise-glacier-flexible-retrieval/299875/3 "2022-04-27T14:42:43Z")

</div>

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