Logstash s3 output plugin storing files as .txt instead of .json on s3

Hi, I need to store my logstash output to s3 as json file. But upon checking the output files in s3, it is stored as .txt format.

Here is my output code:

output {
      s3 {
           region => "${elkRegion}"
           bucket => "${s3Bucket}"
           size_file => 2048
           time_file => 5
           codec => "json"
           prefix => "output/%{+YYYY}/%{+MM}/%{+dd}"

Here is the sample file generated on s3:


I also tried using json_lines and removing double quotes but still not working. Please let me know what I am missing. Thanks

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