abitdodgy
New ExAws IAM service module
I wrote an IAM service module for ExAws. You can find it on GitHub.
It’s a work in progress, but I think I have the internal API figured out. Currently, the following services are supported:
* CreateAccessKey
* CreateUser
* DeleteAccessKey
* DeleteUser
* GetAccessKeyLastUsed
* GetUser
* ListAccessKeys
* ListUsers
* UpdateAccessKey
* UpdateUser
The API aims to be easy to use. For example:
- You can pass params as atoms and the lib converts them into the AWS IAM query format.
- Each operation has its own parser that translates the XML response into its equivalent map in Elixir.
- Helper functions are available to convert some responses into a data structure.
op = Iam.create_user("my_user", path: "/my/path/")
IO.inspect(op)
%ExAws.Operation.Query{
action: "CreateUser",
params: %{
"Action" => "CreateUser",
"Path" => "/my/path/",
"UserName" => "my_user",
"Version" => "2010-05-08"
},
parser: &ExAws.Iam.Parsers.User.create/2,
path: "/my/path/",
service: :iam
}
user = op |> ExAws.request() |> Iam.to_user()
IO.inspect(user)
%ExAws.Iam.User{
arn: "arn:aws:iam::085326204011:user/my/path/my_user",
create_date: "2018-10-18T15:47:08Z",
path: "/my/path/",
user_id: "AIDAIH3RMDWGIGEXAMPLE",
username: "my_user"
}
Extending the library is straightforward. For example, adding a new operation is as easy as:
def create_group(name, opts \\ []) do
:create_group
|> to_params(opts, [group_name: name])
|> to_op()
end
Iam.create_group("my_group", path: "/my/path/")
You may need to write a parser, and, obviously, some tests, but it’s as easy as that.
I’ve not released the lib yet as I’d like to wait for some feedback before doing so.
Popular in Announcing
Hey everyone!
Well, we made this lib a while ago and now we decided to finally go out and public with it! It’s a tool for creating and m...
New
Just looking for a little feedback on a tiny helper library I built -
Sometimes I find the need to convert maps with atom keys to maps w...
New
ex_cldr provides localisation and internationalisation support based upon the data from the Unicode CLDR project.
Unicode released CLDR ...
New
Hi,
I thought I had posted my library before but seems I hadn’t. The project is still in early stages but it’s growing and so I think it...
New
Hi! :waving_hand:
I would like to present LiveSelect, a little library that I wrote to easily add a dynamic selection input to your LV f...
New
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub.
Docs are at OpenaiEx User Gu...
New
Other popular topics
Hi!
In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir?
Searched the docs for ip address and the web, no good results.
Thanks!
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I’m writing a test for one of the...
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
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something…
Haskell reminds me of Java, and e...
New
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar.
I p...
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
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









