Logstash s3 input plugin file extension in prefix not working

Hi.
I would like to specify a file extension that should be read by logstash.
Below my config that I've tried and it's not working.

input {
  s3 {
    access_key_id => ""
    secret_access_key => ""
    bucket => "logs"
    prefix => "dx/*.log"
    type => "aws-logs"
  }
}

is there any workaround how to achieve this?
Thanks!