# AWS CLI MFA with pass-otp made easy
This plugin enables aws-cli to directly talk to [pass](https://www.passwordstore.org/)
to acquire an OATH-TOTP code using the [pass-otp](https://github.com/tadfisher/pass-otp) extension.
## Installation
`awscli-plugin-passtotp` can be installed from PyPI:
```sh
$ pip install awscli-plugin-passtotp
```
It's also possible to install it just for your user in case you don't have
permission to install packages system-wide:
```sh
$ pip install --user awscli-plugin-passtotp
```
### Configure AWS CLI
To enable the plugin, add this to your `~/.aws/config`:
```ini
[plugins]
# If using aws-cli v2 you must specify the path to where the package was installed.
# Use `pip show awscli-plugin-passtotp | grep Location:` to find the right location.
cli_legacy_plugin_path = /foo/bar/lib/python3.9/site-packages/
passtotp = awscli_plugin_passtotp
```
Also make sure to specify a path to a file in your password-store in the profiles managed by pass:
```ini
[profile myprofile]
role_arn = arn:aws:iam::...
mfa_serial = arn:aws:iam::...
mfa_path = foo/aws/bar
...
```
## Usage
Just use the `aws` command with a custom role and the plugin will do the rest:
```sh
$ aws s3 ls --profile myprofile
2013-07-11 17:08:50 mybucket
2013-07-24 14:55:44 mybucket2
```
---
## Acknowledgements
* Thanks to [@tommie-lie](https://github.com/tommie-lie) for [awscli-plugin-yubikeytotp](https://github.com/tommie-lie/awscli-plugin-yubikeytotp)
Raw data
{
"_id": null,
"home_page": "https://github.com/someone-stole-my-name/awscli-plugin-passtotp",
"name": "awscli-plugin-passtotp",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "aws,aws-cli,boto3,pass,pass-otp",
"author": "Christian Segundo",
"author_email": "christian@segundo.com",
"download_url": "https://files.pythonhosted.org/packages/20/f0/238da82ed66c5d7355bced99f48ebc216aa0a7f61ce6d806980e3fb26fd4/awscli_plugin_passtotp-1.0.1.tar.gz",
"platform": null,
"description": "# AWS CLI MFA with pass-otp made easy\n\nThis plugin enables aws-cli to directly talk to [pass](https://www.passwordstore.org/)\nto acquire an OATH-TOTP code using the [pass-otp](https://github.com/tadfisher/pass-otp) extension.\n\n## Installation\n\n`awscli-plugin-passtotp` can be installed from PyPI:\n```sh\n$ pip install awscli-plugin-passtotp\n```\n\nIt's also possible to install it just for your user in case you don't have\npermission to install packages system-wide:\n```sh\n$ pip install --user awscli-plugin-passtotp\n```\n\n### Configure AWS CLI\n\nTo enable the plugin, add this to your `~/.aws/config`:\n```ini\n[plugins]\n# If using aws-cli v2 you must specify the path to where the package was installed.\n# Use `pip show awscli-plugin-passtotp | grep Location:` to find the right location.\ncli_legacy_plugin_path = /foo/bar/lib/python3.9/site-packages/\n\npasstotp = awscli_plugin_passtotp\n```\n\nAlso make sure to specify a path to a file in your password-store in the profiles managed by pass:\n```ini\n[profile myprofile]\nrole_arn = arn:aws:iam::...\nmfa_serial = arn:aws:iam::...\nmfa_path = foo/aws/bar\n...\n```\n\n## Usage\n\nJust use the `aws` command with a custom role and the plugin will do the rest:\n\n```sh\n$ aws s3 ls --profile myprofile\n2013-07-11 17:08:50 mybucket\n2013-07-24 14:55:44 mybucket2\n```\n\n---\n\n## Acknowledgements\n* Thanks to [@tommie-lie](https://github.com/tommie-lie) for [awscli-plugin-yubikeytotp](https://github.com/tommie-lie/awscli-plugin-yubikeytotp)\n\n",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "",
"version": "1.0.1",
"split_keywords": [
"aws",
"aws-cli",
"boto3",
"pass",
"pass-otp"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c809ed7ed0f551dbd9bc3748a452973d51d683517399368000b645c7480c1073",
"md5": "8c110b82a876c118ad3560cfbb5feffb",
"sha256": "a68f00543d50402b94dc9503d1826d49090320e35253a849c823011232afddde"
},
"downloads": -1,
"filename": "awscli_plugin_passtotp-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8c110b82a876c118ad3560cfbb5feffb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 4416,
"upload_time": "2023-03-19T23:17:08",
"upload_time_iso_8601": "2023-03-19T23:17:08.657573Z",
"url": "https://files.pythonhosted.org/packages/c8/09/ed7ed0f551dbd9bc3748a452973d51d683517399368000b645c7480c1073/awscli_plugin_passtotp-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "20f0238da82ed66c5d7355bced99f48ebc216aa0a7f61ce6d806980e3fb26fd4",
"md5": "e4637c11c8c13433f7e643819222611b",
"sha256": "185465b747e1cf7978dc5861dfc3958f6b36b7703715cc8fff9ad7cbab1cf9d1"
},
"downloads": -1,
"filename": "awscli_plugin_passtotp-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "e4637c11c8c13433f7e643819222611b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 3312,
"upload_time": "2023-03-19T23:17:09",
"upload_time_iso_8601": "2023-03-19T23:17:09.704227Z",
"url": "https://files.pythonhosted.org/packages/20/f0/238da82ed66c5d7355bced99f48ebc216aa0a7f61ce6d806980e3fb26fd4/awscli_plugin_passtotp-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-19 23:17:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "someone-stole-my-name",
"github_project": "awscli-plugin-passtotp",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "awscli-plugin-passtotp"
}