# Logstash s3 input plugin and path-style access configuration

**URL:** https://discuss.elastic.co/t/logstash-s3-input-plugin-and-path-style-access-configuration/306412
**Category:** Logstash
**Created:** [June 5, 2022, 9:41pm UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-and-path-style-access-configuration/306412 "2022-06-05T21:41:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![betheway](https://avatars.discourse-cdn.com/v4/letter/b/ea5d25/32.png) [@betheway](https://discuss.elastic.co/u/betheway)
#### Post date: [June 5, 2022, 9:41pm UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-and-path-style-access-configuration/306412/1 "2022-06-05T21:41:47Z")

</div>

With s3 path-style access, the plugin returns an error on the downloading step. From access logs:

```auto
Found key {:key=>"myFile"}
Added to objects[] {:key=>"myFile", :length=>1}
Processing {:bucket=>"", :key=>"myFile"}
Downloading remote file {:remote_key=>"myFile", :local_filename=>"/tmp/logstash/myFile"}
Unable to download remote file {:exception=>Aws::S3::Errors::NoSuchKey, :message=>"The specified key does not exist.", :remote_key=>"myFile"}

```

config:

```auto
 s3 {
    access_key_id => "test"
    secret_access_key => "test"
    endpoint => "http://localhost:5555/my-bucket"
    bucket => "" # http://my-bucket.localhost:5555 returns initialize: name or service not known
    region => "eu-central-1"
  }

```

I don't know how to configure virtual-hosted-style URLs and I feel like having an empty string bucket causes problems with downloading the file from the bucket later.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 3, 2022, 9:42pm UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-and-path-style-access-configuration/306412/2 "2022-07-03T21:42:20Z")

</div>

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