Unknown setting error with s3 input plugin

When using the s3 input plugin with this configuration:

input {
  s3 {
    "bucket" => "my-bucket-name"
    "add_field" => {
      "service" => "aws-access-log-alb"
      "environment" => "demo"
    }
  }
}

I get these errors:

[ERROR] 2020-02-21 10:24:23.701 [LogStash::Runner] s3 - Unknown setting '"bucket"' for s3
[ERROR] 2020-02-21 10:24:23.702 [LogStash::Runner] s3 - Unknown setting '"add_field"' for s3

According to the S3 input plugin docs this looks correct.

This is logstash verison 7.6.0. Recently upgraded from 6.8.0 where this config was working. Could anyone help me find out why these errors are showing up? Cheers!

I have figured this out, the quoted key names were the problem. Changing my configuration to this resolved it:

input {
  s3 {
    bucket => "my-bucket-name"
    add_field => {
      service => "aws-access-log-alb"
      environment => "demo"
    }
  }
}

I'll raise a PR for the documentation!

EDIT: https://github.com/logstash-plugins/logstash-input-s3/pull/195

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