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
Happy to help. What have you tried?
2
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
Popular in Questions
Hello everyone,
I try to use an Javascript Event Handler in my root.html.leex file.
Therefore I created a function in the app.js file: ...
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
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’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage.
I’m trying to use Postgres...
New
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone.
What strikes me is th...
New
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
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
Hi all,
Trying to get some more clarity over utc_datetime and naive_datetime for Ecto:
The documentation above suggests that while ...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
Other popular topics
Hi All,
I set a environment variables in dev.exs , like below code.
when i start server, how can i set the ${enable} value?
thanks.
d...
New
If I have a post route which an argument:
post /my_post_route/:my_param1, MyController.my_post_handler
How would get the post params ...
New
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help.
Where are they similar?
Where do they differ the m...
New
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
Hello, how can I check the Phoenix version ?
Thanks !
New
Hi all,
I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage.
I’m trying to use Postgres...
New
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Good day to you all.
I have been struggling to get a query involving like and ilike to work.
Can anyone assist me on this, please?
pro...
New
I have VueJS GUIs with the project generated using Webpack.
I have Elixir modules that will need to be used by the VueJS GUIs.
I forese...
New
What is the proper way to load a module from a file in to IEX?
In the python world, doing something like this pretty standard:
from ....
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
- #javascript
- #code-sync
- #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
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









