# Connection was closed while response was still in-flight with localstack-s3

**URL:** <https://discuss.akka.io/t/connection-was-closed-while-response-was-still-in-flight-with-localstack-s3/7358>\
**Category:** Akka Streams & Alpakka\
**Created:** [October 21, 2020, 11:45am UTC](https://discuss.akka.io/t/connection-was-closed-while-response-was-still-in-flight-with-localstack-s3/7358 "2020-10-21T11:45:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mfudi](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/mfudi/32/2781_2.png) [@Mfudi](https://discuss.akka.io/u/Mfudi)\
**Post date:** [October 21, 2020, 11:45am UTC](https://discuss.akka.io/t/connection-was-closed-while-response-was-still-in-flight-with-localstack-s3/7358/1 "2020-10-21T11:45:36Z")

</div>

Hello, i’m running locally

- akka-stream-alpakka-s3 v2.0.2
- scala 2.12.12
- [localstack v0.11.6](https://github.com/localstack/localstack/releases/tag/v0.11.6)

```auto
docker run -e SERVICES='s3' -e DEFAULT_REGION='eu-west-1' -p 4566:4566 -it localstack/localstack:0.11.6

```

- create bucket with aws cli:

```auto
aws --endpoint-url=http://localhost:4566 s3 mb s3://testBucket

```

- when calling:

```auto
S3.checkIfBucketExists("testBucket")

```

it fails with error:  
`Connection was closed while response was still in-flight`

Am i missing something ?

---

<div class="post-metadata">

**Author:** ![eATaFEu](https://avatars.discourse-cdn.com/v4/letter/e/d9b06d/32.png) [@eATaFEu](https://discuss.akka.io/u/eATaFEu)\
**Post date:** [October 21, 2020, 3:27pm UTC](https://discuss.akka.io/t/connection-was-closed-while-response-was-still-in-flight-with-localstack-s3/7358/2 "2020-10-21T15:27:44Z")

</div>

> alpakka.s3.access-style = path

adding this config to application.conf solved it for me.
