ex-aws / ex_aws

A flexible, easy to use set of clients AWS APIs for Elixir
https://hex.pm/packages/ex_aws
MIT License
1.26k stars 521 forks source link

Compatibility with other providers? #938

Closed mvkvc closed 1 year ago

mvkvc commented 1 year ago

Hello,

I would like to use this library to upload to Backblaze B2, which is an S3 compatible store with has an endpoint like s3.us-west-002.backblazeb2.com. Is this possible?

Thank you

bernardd commented 1 year ago

Yep, in general you should just be able to set the host value in the config to override it to whatever the hostname you want is.

mvkvc commented 1 year ago

Thank you!

ndrean commented 9 months ago

Hi. Thanks, indeed, just "host" and "client_id" and "client_secret" for B2.

config :ex_aws, :s3,
   host: "https://s3.eu-central-003.backblazeb2.com/<my-bucket>
   region: eu-central-003,
   ...
peaceful-james commented 7 months ago

Hi. Thanks, indeed, just "host" and "client_id" and "client_secret" for B2.

config :ex_aws, :s3,
   host: "https://s3.eu-central-003.backblazeb2.com/<my-bucket>
   region: eu-central-003,
   ...

This will not work. When you specify the region like this in the config, you will get an error like

s3 not supported in region eu-central-003 for partition aws

Just do not specify the region.

See here: https://elixirforum.com/t/backblaze-and-ex-aws-ex-aws-s3-2-4-3-presign-url-issue/56805