Skip to main content

AWS MFA Plugin

An awscli plugin to authenticate and retrive AWS temporary credentials using a MFA device.

Installation

This plugin was published in pypi.org. So the installation can be done using pip.

$ pip3 install --user aws-mfa-plugin

NOTE: We recommend installing inside user-site

Configure the plugin

If you are using awscli v1 configuring plugin is pretty simple.

$ aws configure set plugins.mfa aws-mfa

Otherwise, If you are using awscli v2, there is a need for additional config. see for more details.

$ aws configure set plugins.cli_legacy_plugin_path $(python3 -m site --user-site)

Assumed the plugin installed inside user-site

Verify plugin installation

If you configure correctly the plugin will become a subcommand of aws command.

$ aws mfa

Getting Started

Before using this plugin to retrieve temporary credentials you need to configure mfa_serial device.

$ aws configure set mfa_serial <your-mfa-serial-device>

To retrive temporary credentials

$ aws mfa cred-env
MFA Token for (arn:aws:iam::1234567890:mfa/username): 123456
export AWS_ACCESS_KEY_ID=<access-key-id>
export AWS_SECRET_ACCESS_KEY=<access-secret-key>
export AWS_SESSION_TOKEN=<token>

Or you can directly set these temporary credentials as environment variable by using eval command

$ eval $(aws mfa cred-env)
MFA Token for (arn:aws:iam::1234567890:mfa/username): 123456

License

This project licensed under MIT LICENSE, see LICENSE.

Metadata

Release files for aws-mfa-plugin 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-mfa-plugin 0.0.4
File Size Uploaded
aws-mfa-plugin-0.0.4.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aws-mfa-plugin 0.0.4
File Interpreter ABI Platform
aws_mfa_plugin-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 12.1 kB

Release files / aws-mfa-plugin-0.0.4.tar.gz

Download URL aws-mfa-plugin-0.0.4.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4484b12be78191fca6f18c94924b14bdc324b16cc439fdfbb90e6a237bd8f565
BLAKE2b-256 checksum
How to use checksums
1433f3e081ea7c342eddfb2d304135a19749d8100787ba4647d549b0bb1ae919
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release files / aws_mfa_plugin-0.0.4-py3-none-any.whl

Download URL aws_mfa_plugin-0.0.4-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a67e219b178e2349ad19811a7e6968191f2e25f8ba59b4e8a69c0a33f80f2d5f
BLAKE2b-256 checksum
How to use checksums
0c293453a7307f12370dcaa3c54246df0055f87eed02b57cd17a75b8cd0a83cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page