maz
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:
config :ex_aws,
json_codec: Jason,
debug_request: true,
access_key_id: "asdf",
secret_access_key: "asdf",
s3: [
scheme: "https://",
host: "https://s3.us-east-005.backblazeb2.com",
region: "us-east-005"
]
input:
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.Config.new(:s3) |> ExAws.S3.presigned_url(:put, "bucket-media-main", "output.mp4", presign_options)
error:
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: ExAws.Config.new/2
iex:6: (file)
Is this backblaze, a config issue or does ex_aws just not support backblaze?
Marked As Solved
zaljir
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: "s3.eu-central-003.backblazeb2.com",
bucket: ""
5
Also Liked
maz
Success, thanks that saved me a bunch of time.
1
Popular in Questions
Hi! May someone helps me, please!
I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
Student & New to elixir. Nice language.
I want to convert a english character, e.g. “a”, which is stored in a variable, to it’s asci...
New
Hey guys.
I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
Background
Let’s assume I have a typical GenServer that receives messages as requests, does some operation in a DB and returns responses....
New
Hey all,
I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Hi all
I want to have a unix time, from the current time plus 1 hour.
DateTime.now + 1 hour
How to get it in elixir?
Thanks
New
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: )
Hello all, this is ...
New
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work.
Or rather, not char, but a substr...
New
I have a super simple question about elixir - how would I take a file like this
foo bar baz
and output a new file that enumerates th...
New
Other popular topics
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
Manning 2016 Halloween weekend sale via Deal of the Day
Friday, October 28 - Half off all MEAPs - code WM102816LT
Saturday, October 29 ...
New
In Ruby, I can go:
User.find_by(email: "foobar@email.com").update(email: "hello@email.com")
How can I do something similar in Elixir? ...
New
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!)
This post collects co...
New
I have a User schema with a :from_id field set to type :string:
defmodule TweetBot.Repo.Migrations.CreateUsers do
use Ecto.Migration
...
New
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
I will often find my self writing things similar to:
case some_value do
nil -> something()
"" -> something()
_ -> someth...
New
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors:
[WARN] - (starship::utils): Executing command ...
New
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New







