{"id":27969161,"url":"https://github.com/future-architect/awsmfa","last_synced_at":"2025-05-07T21:08:46.114Z","repository":{"id":40339235,"uuid":"306475934","full_name":"future-architect/awsmfa","owner":"future-architect","description":"replaces the credentials for MFA in AWS","archived":false,"fork":false,"pushed_at":"2022-05-14T02:16:51.000Z","size":45,"stargazers_count":32,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T21:08:40.760Z","etag":null,"topics":["aws","awscli","credentials","go","golang","mfa","sts"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/future-architect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-22T22:51:34.000Z","updated_at":"2025-03-31T01:27:51.000Z","dependencies_parsed_at":"2022-08-09T17:40:39.557Z","dependency_job_id":null,"html_url":"https://github.com/future-architect/awsmfa","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fawsmfa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fawsmfa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fawsmfa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fawsmfa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/future-architect","download_url":"https://codeload.github.com/future-architect/awsmfa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954409,"owners_count":21830905,"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","awscli","credentials","go","golang","mfa","sts"],"created_at":"2025-05-07T21:08:45.409Z","updated_at":"2025-05-07T21:08:46.094Z","avatar_url":"https://github.com/future-architect.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"awsmfa (AWS MFA Refresher)\n==========================\n\n[![Test Status](https://github.com/future-architect/awsmfa/workflows/test/badge.svg?branch=master)][actions]\n[![Apache-2.0 license](https://img.shields.io/badge/license-Apache2.0-blue.svg)][license]\n\n[actions]: https://github.com/future-architect/awsmfa/actions?workflow=test\n[license]: https://github.com/future-architect/awsmfa/blob/master/LICENSE\n\n`awsmfa` replaces the config and credentials for MFA in AWS.\n\n## Usage\n\n```console\n$ awsmfa [options] [token-code]\n```\n\n- The config file uses `~/.aws/config` by default. You can override it with the environment variable `AWS_CONFIG_FILE`.\n- The credentials file uses `~/.aws/credentials` by default. You can override it with the environment variable `AWS_SHARED_CREDENTIALS_FILE`.\n\n### Options\n\n```\n--profile string\n\tThe name of the profile from which the session can be obtained (default `default`)\n\n--mfa-profile-name string\n\tMFA profile name (default `mfa`)\n\n--duration-seconds int64\n\tSession expiration duration secounds (default `43200`)\n\n--serial-number string\n\tAWS serial number. `--serial-number` is required\n\n--quiet bool\n\tif enabled, log is not printed in the console. (default `false`)\n```\n\n### Example\n\n```\n$ awsmfa --serial-number arn:aws:iam::123456789012:mfa/future-architect --profile my-profile 123456\n2021/02/28 11:01:49 Wrote session token for profile mfa, expiration: 2021-02-28 14:01:49.689 +0000 UTC\n```\n\n#### initial\n\n- `.aws/config`\n\n\u003ctable\u003e\n\u003cthead\u003e\u003ctr\u003e\u003cth\u003eBefore\u003c/th\u003e\u003cth\u003eAfter\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\u003ctd valign=\"top\"\u003e\n\n```ini\n[default]\nregion = us-east-1\noutput = json\n```\n\n\u003c/td\u003e\u003ctd valign=\"top\"\u003e\n\n```ini\n[default]\nregion = us-east-1\noutput = json\n\n[profile mfa]\n\n```\n\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n\n- `.aws/credentials`\n\n\u003ctable\u003e\n\u003cthead\u003e\u003ctr\u003e\u003cth\u003eBefore\u003c/th\u003e\u003cth\u003eAfter\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\u003ctd valign=\"top\"\u003e\n\n```ini\n[default]\naws_access_key_id = ABCDEFGHIJKLMNOPQRST\naws_secret_access_key = ChcdJbC9kraRNW5iy8XgDyR4QNRT44kKRPmKEGQT\n```\n\n\u003c/td\u003e\u003ctd valign=\"top\"\u003e\n\n```ini\n[default]\naws_access_key_id     = ABCDEFGHIJKLMNOPQRST\naws_secret_access_key = ChcdJbC9kraRNW5iy8XgDyR4QNRT44kKRPmKEGQT\n\n[mfa]\naws_access_key_id     = AKIAIOSFODNN7EXAMPLE\naws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY\naws_session_token     = AQoEXAMPLEH4aoA....\n\n```\n\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n\n\n#### next time\n\nUpdate `aws_access_key_id`, `aws_secret_access_key` and `aws_session_token` in the target section (default is `mfa`) of `.aws/credentials`.\n\n## Installation\n\n- From binary\n\n```\n# Install the latest version. (Install it into ./bin/ by default).\n$ curl -sfL https://raw.githubusercontent.com/future-architect/awsmfa/master/install.sh | sh -s\n\n# Specify installation directory ($(go env GOPATH)/bin/) and version.\n$ curl -sfL https://raw.githubusercontent.com/future-architect/awsmfa/master/install.sh | sh -s -- -b $(go env GOPATH)/bin [vX.Y.Z]\n```\n\nOn Windows, you can run the above commands with Git Bash, which comes with [Git for Windows](https://git-scm.com/download/win).\n\n- From source code\n\n```\n$ go install github.com/future-architect/awsmfa/cmd/awsmfa@latest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-architect%2Fawsmfa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuture-architect%2Fawsmfa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-architect%2Fawsmfa/lists"}