Backblaze and ex_aws/ex_aws_s3 2.4.3 presign url issue

Does ex_aws(2.4.3) support backblaze s3 api out the box? I’m trying to obtain a presigned url via the backblaze s3 api like so but I’m ultimately getting this error: s3 not supported in region us-east-005 for partition aws


config :ex_aws,
  json_codec: Jason,
  debug_request: true,
  access_key_id: "asdf",
  secret_access_key: "asdf",
  s3: [
    scheme: "https://",
    host: "",
    region: "us-east-005"


iex(4)> query_params = [{"ContentType", MIME.from_path("output.mp4")}, {"x-amz-acl", "public-read"}]                                    
[{"ContentType", "video/mp4"}, {"x-amz-acl", "public-read"}]
iex(5)> presign_options = [query_params: query_params, virtual_host: false]                                                                   
  query_params: [{"ContentType", "video/mp4"}, {"x-amz-acl", "public-read"}],
  virtual_host: false
iex(6)> {:ok, presigned_url} = |> ExAws.S3.presigned_url(:put, "bucket-media-main", "output.mp4", presign_options)


But this seems to result in an error inside ex_aws:

** (RuntimeError) s3 not supported in region us-east-005 for partition aws
    (ex_aws 2.4.3) lib/ex_aws/config/defaults.ex:175: ExAws.Config.Defaults.fetch_or/3
    (ex_aws 2.4.3) lib/ex_aws/config/defaults.ex:158: ExAws.Config.Defaults.do_host/3
    (ex_aws 2.4.3) lib/ex_aws/config/defaults.ex:89: ExAws.Config.Defaults.get/2
    (ex_aws 2.4.3) lib/ex_aws/config.ex:96: ExAws.Config.build_base/2
    (ex_aws 2.4.3) lib/ex_aws/config.ex:69:
    iex:6: (file)

Is this backblaze, a config issue or does ex_aws just not support backblaze?

It works for me with the following config. I think you don’t have to specify the region:

config :ex_aws, :s3,
  access_key_id: [""],
  secret_access_key: [""],
  host: "",
  bucket: ""

Success, thanks that saved me a bunch of time.

1 Like