# Logstash s3 output plugin not working properly

**URL:** <https://discuss.elastic.co/t/logstash-s3-output-plugin-not-working-properly/284159>\
**Category:** Logstash\
**Created:** [September 14, 2021, 8:53am UTC](https://discuss.elastic.co/t/logstash-s3-output-plugin-not-working-properly/284159 "2021-09-14T08:53:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishakha.tyagi.blaze](https://avatars.discourse-cdn.com/v4/letter/v/b5ac83/32.png) [@vishakha.tyagi.blaze](https://discuss.elastic.co/u/vishakha.tyagi.blaze)\
**Post date:** [September 14, 2021, 8:53am UTC](https://discuss.elastic.co/t/logstash-s3-output-plugin-not-working-properly/284159/1 "2021-09-14T08:53:24Z")

</div>

So we are trying to use Logstash to send out some logs to s3 and its not working for some reason. This is the code we are using.

```auto
output {
                amazon_es {
                        hosts => ["xxxx"]
                        region => "xxxx"
                        index => "%{[fields][log_type]}-%{+YYYY.MM.dd}"
                }
                s3 {
                        bucket => 'xxxx'
                        region => 'xxxx'
                        time_file => 5
                        role_arn => 'xxxx'
                        prefix => '%{+YYYY}/%{+MM}/%{+dd}/xxxx'
                        codec => 'json_lines'
                }
}

```

Please note that this very same code worked in our non-prod environment, it is only troubling us in Production. Also, the amazon\_es block is working fine in Production, its only the s3 part which isn't working. Its not an iam role issue, it has all the permissions possible assigned to it at this point and its still not working.

I have attached the error logs screenshot of when we try and start up logstash with the s3 output block. Would appreciate some insight on this. We can't really get the whole logs from production - but these are the only relevant logs for this however.

 ![Logstash_error_logs](https://us1.discourse-cdn.com/elastic/original/3X/4/7/4788f5db2fea52c29c372df54c9285bb0b2bfea0.jpeg)

---

<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:** [October 12, 2021, 8:54am UTC](https://discuss.elastic.co/t/logstash-s3-output-plugin-not-working-properly/284159/2 "2021-10-12T08:54:08Z")

</div>

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