Alpakka S3 connection issue

Regardless what I try, I’m not able to connect to an aws s3 endpoint. I’m running minio locally on my computer. In another project I’m using alpakka-s3 v1.1.2 and it works, also using the browser to connect to the minio ui works. Using the latest version of alpakka-s3 2.0.0 I can not connect. Always getting a S3Exception: 404 page not found.

I tried several approaches. Loading settings via standard conf described here and also defining settings via S3Ext. I tried to outline the problem on stackoverflow, but got no help. I really don’t know what I can do anymore. Hopefully someone here can help.

Are you sure that the config for alpakka is correctly defined in the application.conf ?
For example:

alpakka.s3 {
   endpoint-url = http://localhost:4572

Working config for me:

alpakka.s3 {
  aws {
    credentials {
      provider = static
      access-key-id = "TESTKEY"
      access-key-id = ${?S3_KEY}
      secret-access-key = "TESTSECRET"
      secret-access-key = ${?S3_SECRET}
    region {
      provider = static
      default-region = "us-east-1"
      default-region = ${?S3_REGION}
  path-style-access = true
  endpoint-url = "http://localhost:9001"
  endpoint-url = ${?S3_ENDPOINT}

with the following docker compose part:

    image: minio/minio:RELEASE.2020-04-28T23-56-56Z
      - "9001:9000"
    command: server /data

The path-style-access is going to deprecated, and it is not the default way, I had aboult an hour in that one line :)

1 Like

@tg44 thanks for your help. It was exactly this one line path-style-access = true.

Since the documentation says it is deprecated I didn’t even consider setting this value.

For the sake of completeness, I changed both approaches which I outlined in my stackoverflow post, one being setting the correct parameter in the application.conf and also when specifying theses params programmatically via S3Ext and now both approaches work. Even though I’m getting a warning, that this value is going to be deprecated. In alpakka-s3 the function withPathStyleAccess(...) is already deprecated.

Anyway, it now works and I can live with that warning. Thx a lot :slight_smile:

Since the documentation says it is deprecated I didn’t even consider setting this value.

Please note that Alpakka S3 now supports custom endpoint URLs with virtual-host-style access:

1 Like