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.3
The library has evolved since October 2023, but this module still exists. (Didn’t try to run this code though.)
1
Popular in Questions
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
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
i’m a new one to elixir
which editor can i use
vs code? or atom?
Thanks! :smiley:
New
Hey all, just started picking up Elixir last week and am writing a scraper as a learning project.
Baby step #1 is extracting the number ...
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
Hi guys, i’m new in the Elixir world, and i have to say, that i love it!
i’m having some problem to understand anonymous functions with ...
New
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
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
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
New
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine)
This is a plugin that adds support for Elixir to JetBrains IntelliJ...
New
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
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
Hi,
I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
Using vs code and installed ElixirLS: support and debugger.
And I got an error popped up on start up says
Failed to run ‘elixir’ comma...
New
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including.
What is Phoenix LiveV...
New







