yanniskatsaros
Hello!
I am working on a project and was hoping to use Backblaze B2 (as an alternative to S3) due to its low cost and generous free egress. I am hoping to get recommendations from anyone that has similar experience using B2 in Elixir. Which client library did you use? Did you use one of the dedicated Elixir clients, or did you use the S3-compatible API with one of the Elixir AWS clients? If so, how did you make your decision and what has your experience been?
Most of the dedicated B2 Elixir clients that I could find appear to be relatively old and it concerns me adopting them in case I run into any issues. These are the ones I found:
b2_client(updated last: 4 years ago)ex-file-b2(updated last: 8 years ago)- companion libraray:
ex-file(updated last: 5 years ago)
- companion libraray:
riboflavin(updated last: 9 years ago)
Conversely, if you recommend the S3-compatible API, which Elixir S3 client would you recommend? Here are two that I found, but are they are any specific libraries you have experience using and recommend?
aws-elixirex_awswithex_aws_s3
Thanks in advance!
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security











Marked As Solved- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
D4no0
For file upload, I would definitely use
ex_aws_s3, I have used it in the past with backblaze successfully on a project, you really don’t want to deal with things like large file uploads on your own and the s3 library works very well.As for other backblaze specific endpoints, what I personally did was to just use a customized HTTPoison client and implement authentication and the few APIs I needed from their official documentation, it is very fast and easy to do as their API documentation is pretty good.
Also Liked
ragamuf
Also recommend rolling your own for the parts that are simple if you are concern about outdated libraries. Check out this article on Small Development Kits (SDK) from Dashbit if you need inspiration. SDKs with Req: Stripe - Dashbit Blog
wojtekmach
Thanks for the mention. I tried Req/ReqS3 with a few S3-compatible services but not yet B2. If anyone runs into any problems please open up an issue!
wojtekmach
Oh, there is one consideration for Backblaze in particular. If you’d upload huge files, instead of doing it in a single
put_object(an HTTP PUT) you may consider doing multipart uploads,ExAws.S3.initiate_multipart_upload/2and friends. These are not available in Req/ReqS3 and there are no plans at the moment.Last Post!
yanniskatsaros
@ragamuf and @wojtekmach I ended up implementing a small and lightweight B2 client using the advice in the article. This is only for my own use, so there is room for improvement (feel free to add any suggestions/feedback!) but here is what the end result looks like:
And here is some example usage:
Thanks again to everyone that provided recommendations, I really appreciate the feedback