gpartha
Using aws-elixir and local Minio
Hi,
I am trying to use aws-elixir to access local Minio, any example code to refer to?
Thanks,
Partha
Marked As Solved
gpartha
Managed to get it working. Documenting the steps for others. If there is better way, please do let me know
- Running Minio locally at 9000
- Have the Client created as follows
iex(1)> client = AWS.Client.create(“id”, “key”, “localhost”)
iex(2)> client = %{client | port: 9000}
iex(3)> client = %{client | proto: “http”}
iex(4)> client = %{client | endpoint: “localhost”}
#AWS.Client<
region: "localhost",
service: nil,
endpoint: "localhost",
proto: "http",
port: 9000,
http_client: {AWS.HTTPClient.Hackney, []},
json_module: {AWS.JSON, []},
xml_module: {AWS.XML, []},
...
Then used it to invoke
iex(5)> AWS.S3.create_bucket(client, “mybucket”, %{})
{:ok, nil,
%{
body: "",
headers: [
{"Server", "nginx/1.19.2"},
{"Date", "Tue, 03 Oct 2023 22:30:21 GMT"},
{"Content-Length", "0"},
{"Connection", "keep-alive"},
{"Accept-Ranges", "bytes"},
{"Location", "/mybucket"},
{"Strict-Transport-Security", "max-age=31536000; includeSubDomains"},
{"Vary", "Origin"},
{"Vary", "Accept-Encoding"},
{"X-Amz-Id-2",
"e0c385c033c4356721cc9121d3109c9b9bfdefb22fd2747078acd22328799e36"},
{"X-Amz-Request-Id", "178AB98C4ABCE5E0"},
{"X-Content-Type-Options", "nosniff"},
{"X-Xss-Protection", "1; mode=block"}
],
status_code: 200
}}
1
Also Liked
kip
ex_cldr Core Team
linusdm
I guess OP was using this module? AWS.Client — aws-elixir v1.0.13
The library has evolved since October 2023, but this module still exists. (Didn’t try to run this code though.)
1
Last Post!
almir-neto
Popular in Questions
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
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 have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
After calling mix ecto.create I get this error:
17:00:32.162 [error] GenServer #PID<0.412.0> terminating
** (Postgrex.Error) FATAL...
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Other popular topics
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
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
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
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
New
What learn first? Rust or Elixir
Hi Elixir community!
I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









