{"id":17966222,"url":"https://github.com/eigo-mt-fuji/ex-awsconf","last_synced_at":"2025-04-03T20:40:24.874Z","repository":{"id":62429046,"uuid":"243692838","full_name":"Eigo-Mt-Fuji/ex-awsconf","owner":"Eigo-Mt-Fuji","description":"Elixir cli tool for generating aws-cli config","archived":false,"fork":false,"pushed_at":"2020-03-01T05:57:12.000Z","size":3358,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T01:28:36.829Z","etag":null,"topics":["aws","docker","elixir","elixir-lang"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Eigo-Mt-Fuji.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-28T06:20:47.000Z","updated_at":"2020-03-01T05:57:14.000Z","dependencies_parsed_at":"2022-11-01T20:02:14.999Z","dependency_job_id":null,"html_url":"https://github.com/Eigo-Mt-Fuji/ex-awsconf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eigo-Mt-Fuji%2Fex-awsconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eigo-Mt-Fuji%2Fex-awsconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eigo-Mt-Fuji%2Fex-awsconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eigo-Mt-Fuji%2Fex-awsconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eigo-Mt-Fuji","download_url":"https://codeload.github.com/Eigo-Mt-Fuji/ex-awsconf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247078756,"owners_count":20879948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","docker","elixir","elixir-lang"],"created_at":"2024-10-29T13:08:30.689Z","updated_at":"2025-04-03T20:40:24.847Z","avatar_url":"https://github.com/Eigo-Mt-Fuji.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\n[![hex.pm version](https://img.shields.io/hexpm/v/ex_awsconf.svg)](https://hex.pm/packages/ex_awsconf)\n[![hex.pm](https://img.shields.io/hexpm/l/ex_awsconf.svg)](https://github.com/Eigo-Mt-Fuji/ex-awsconf/blob/master/LICENSE.md)\n\nSimple cli-tool for generating aws config.\u003cbr/\u003e\n(and also generating AWS switch role login links markdown file.)\n\n\n## Installation\n\nIf [available Docker](https://hub.docker.com/r/efgriver/ex-awsconf), the docker image can be installed by `docker pull efgriver/ex-awsconf` command on terminal.\n \nIf [available in Hex](https://hexdocs.pm/ex_awsconf), the package can be installed by adding `ex_awsconf` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:ex_awsconf, \"~\u003e 0.1.2\"}\n  ] \nend\n```\n\n## Require \n\n* elixir version 1.9 (or later)\n* erlang version 21 (or later)\n\n## How to use\n\n* Clone Repository and Get Dependencies \n\n```bash\n$ git clone git@github.com:Eigo-Mt-Fuji/ex-awsconf.git\n$ cd ex-awsconf/\n$ mix deps.get\n```\n\n* Prepare csv file(with your aws accounts, save into files directory)\n\n```bash\nmkdir -p files/\ncat \u003c\u003cEOF \u003e files/my-accounts.csv\n\"\u003caws_account_id\u003e\",\"\u003croot login e-mail address\u003e\",\"aws IAM-Role name\",\"profile name(aws-cli )\",\"display name(for browser)\"\nEOF\n```\n\n* Build escript\n\n```bash\nMIX_ENV=prod mix escript.build\n```\n\n* Prepare artifacts directory (results will be saved into this directory.)\n\n```bash\nrm -rf ./artifacts\nmkdir -p ./artifacts\n```\n\n* Execute\n\n```bash\n./ex_awsconf \u003cparent_aws_account_id\u003e ./files ./artifacts json arn:aws:iam::\u003cparenparent_aws_account_idt_account_id\u003e:mfa/\u003cuser_name\u003e \u003crole_session_name\u003e\n```\n\n  - with Docker.\n\n```bash\ndocker run \\\n  -v $(pwd)/files:/usr/local/src/files:ro \\\n  -v $(pwd)/artifacts:/usr/local/src/artifacts:rw \\\n  efgriver/ex-awsconf:latest \\\n  \u003cparent_aws_account_id\u003e /usr/local/src/files /usr/local/src/artifacts \u003caws-cli default output format(e.g. json)\u003e\\\n  arn:aws:iam::\u003cparent_aws_account_id\u003e:mfa/\u003cuser_name\u003e \\\n  \u003crole-session-name\u003e\n```\n\n* Execute Output is JSON format like following.\n\n```json\n{\n  \"artifacts\": [\n    {\n      \"aws_config\": \"./artifacts/my-accounts/config\",\n      \"src\": \"./files/my-accounts.csv\",\n      \"switch_role_link_md\": \"./artifacts/my-accounts/switch_role_link.md\"\n    },\n    ..\n  ],\n  \"status\": \"ok\"\n}\n```\n\n* aws-cli's config, markdown(for aws switch-role login) should be exists (per each csv file in files directory)\n\n```bash\n$ find -type f $(pwd)/artifacts\n/Users/fujikawa/Documents/git/ex-awsconf/artifacts/my-accounts/config\n/Users/fujikawa/Documents/git/ex-awsconf/artifacts/my-accounts/switch_role_link.md\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feigo-mt-fuji%2Fex-awsconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feigo-mt-fuji%2Fex-awsconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feigo-mt-fuji%2Fex-awsconf/lists"}