S3の情報を取得する方法(tags設定時)

②のaws.s3.bukect.name、aws.s3.object.keyについて確認させてください。

filebeat.reference.ymlを見ても、この設定項目がなく、ドキュメントにも記載がないため、どこかに書いてありましたでしょうか?

# Beta: Config options for AWS S3 input
#- type: s3
  #enabled: false

  # AWS Credentials
  # If access_key_id and secret_access_key are configured, then use them to make api calls.
  # If not, s3 input will load default AWS config or load with given profile name.
  #access_key_id: '${AWS_ACCESS_KEY_ID:""}'
  #secret_access_key: '${AWS_SECRET_ACCESS_KEY:""}'
  #session_token: '${AWS_SESSION_TOKEN:"”}'
  #credential_profile_name: test-s3-input

  # Queue urls (required) to receive queue messages from
  #queue_urls: ["https://sqs.us-east-1.amazonaws.com/1234/test-s3-logs-queue"]

  # The duration (in seconds) that the received messages are hidden from subsequent
  # retrieve requests after being retrieved by a ReceiveMessage request.
  #visibility_timeout: 300

テストとして、以下のような設定で、test.log以外のファイルをアップしても、filebeatでinput処理されました。

- type: s3
  queue_url: 	https://sqs.ap-northeast-1.amazonaws.com/***********/sqs-test
  access_key_id: himitsunoid
  secret_access_key: himitsunokey
  aws.s3.bucket.name: "temp.work"  
  aws.s3.object.key: "test.log" 
  tags:
    - "companyA_1"

このことからすると、aws.s3.bucket.nameなどでフィルタリング処理されているわけではないように考えています。

つまり、結果としてどちらのS3 inputでも処理される可能性があり、意図しない方のS3インプットに入って処理されると、逆のタグ設定がされ、
たまたま意図した方のS3インプットで処理されると、期待した結果と一致したインデックス登録になると考えます。
こうしたことから、逆のもあれば、正解のもあるといった状況になっているのではと考えます。

ドキュメント上、実際の挙動からみてaws.s3.bukect.name、aws.s3.object.keyといった設定はできない(あくまでも処理した結果が格納されるOutputのフィールドな)のではないでしょうか。