# How to read avro serialized file from s3

**URL:** <https://discuss.elastic.co/t/how-to-read-avro-serialized-file-from-s3/207455>\
**Category:** Logstash\
**Created:** [November 12, 2019, 7:40am UTC](https://discuss.elastic.co/t/how-to-read-avro-serialized-file-from-s3/207455 "2019-11-12T07:40:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adarsh\_Kumar1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adarsh_kumar1/32/46821_2.png) [@Adarsh\_Kumar1](https://discuss.elastic.co/u/Adarsh_Kumar1)\
**Post date:** [November 12, 2019, 7:40am UTC](https://discuss.elastic.co/t/how-to-read-avro-serialized-file-from-s3/207455/1 "2019-11-12T07:40:31Z")

</div>

I have avro files in s3 bucket and I am using s3 input plugin to read the file and passed by schema to codec but its throwing error and unable parse the file.  
When I looked into the code for input plugin, it seems not .tar or .gz then it reads the file as a plain file.  
Does this read condition has something to do with parsing error. S3 input config is simple.  
Error I am getting : `Failed to read the file. Skip processing. {:filename=>"/tmp/logstash/3_42ecaa46-033c-4289-8413-e3e6a2b6f961-0-0.avro", :exception=>"negative length -40 given"}`

---

<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 10, 2019, 7:40am UTC](https://discuss.elastic.co/t/how-to-read-avro-serialized-file-from-s3/207455/2 "2019-12-10T07:40:38Z")

</div>

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