how to use Logstash to rename files in aws s3

I want to use Logstash to rename incoming files.

Example:

  • incoming file is saved as /customer1/file.txt
  • Logstash renames the file to /customer1/date/file.txt
  • incoming file is saved as /customer2/file.txt
  • Logstash renames the file to /customer2/date/file.txt

Iam i right with my assumption that i don’t need elastic search for that?

Currently iam running Logstash locally in docker and have the following configuration:

    input {
  s3 {
    access_key_id => "something"
    secret_access_key => "something_else"
    region => "some_region"
    bucket => "mybucket"
    interval => "10"
    backup_add_prefix =>'s3://mybucket/customer1/date'
    additional_settings => {
      force_path_style => true
      follow_redirects => false
                }
  }
}

Where do i go from here?

Source: StackOverflow