Logstash to s3 dynamic bucket

Hey,
I'm trying to upload data from logstash to s3. I couldnt find any way to use a dynamic bucket name. In my json input I'm getting a key that is called bucket_name and I would like to use that as the destination bucket in s3.

I saw this issue that was opened 2 years ago and I wanted to know if there is some kind of solution to it..

My output :  
output {
  s3 {
    bucket => "%{bucket_name}"
    codec => "line"
    prefix => "%{+YYYY.MM.dd}}"
    temporary_directory => "/etc/logstash/s3"
  }
}

If I try to add the bucket_name variable into the prefix and use a hard_coded bucket_name everything works...
When the bucket_name is dynamic I'm getting the following error :
Error validating bucket write permissions! {:message=>"The specified bucket is not valid.", :class=>"Aws::S3::Errors::InvalidBucketName",

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