Skip to main content
# aws-mfa-login
Command-line tool for MFA authentication against the AWS CLI. Only generates environment variables, no state or configuration (MFA serial can optionally be added to AWS config).

Will by default ask for MFA token, and grab MFA device serial from the default profile in `~/.aws/config`.

Profile, serial and token can also be passed on the command line.

You must have a valid authentication for AWS CLI already set up for the STS call to succeed.

Examples:

```
> aws-mfa-login --help
usage: aws-mfa-login [-h] [--token TOKEN] [--profile PROFILE | --serial SERIAL]
[--fish | --bash]

optional arguments:
-h, --help show this help message and exit
--token TOKEN MFA token to use for login
--profile PROFILE AWS Profile to read MFA Serial from
--serial SERIAL MFA device serial (e.g.
arn:aws:iam::00000000000:mfa/myiamuser)
--fish Override shell guessing, set to fish (use "set -e")
--bash Override shell guessing, set to bash (use "unset")

> aws-mfa-login
MFA token: 123456
export AWS_ACCESS_KEY_ID=ASIAJ5YFB3RUUOXGYOZQ
export AWS_SECRET_ACCESS_KEY=abWbgMq5432lLIn6x34tj+Wlpykq1WR/KvbG2SXg
export AWS_SESSION_TOKEN=FQodyXlDvLv//////////wEaDCDCm3ZyUN0wDhSDKd3klfssZo4zNgTqnmUiVH0Hp8EUwtdKwvbiAa7JsyXVfzP2vaM0MTZmur/SDFDSf33/77WSdNtpUnaMyEnNP//XA7OVzmzlMLAXKYAbzrq3tBVuXxspEccz+qrxMZkfXD+DfLfkgbKF384kSDksKDF+85kZZTTr6t4t7v1tZ9DNV3xEehNJk8BS5yrD6vKusGRir+ZVm3SDFddfdsDFFD
```

Metadata

Release files for aws-mfa-login 1.0.1

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-login 1.0.1
File Size Uploaded
aws-mfa-login-1.0.1.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aws-mfa-login 1.0.1
File Interpreter ABI Platform
aws_mfa_login-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 kB

Release files / aws-mfa-login-1.0.1.tar.gz

Download URL aws-mfa-login-1.0.1.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8b19834f8b6bddef2dc13a360f7eef08be3396ee38d1cfb63bc07e606e732822
BLAKE2b-256 checksum
How to use checksums
7374b5ee34c260d22325d093b569c0d5e568e870abbffa1ebbf2cb1e9b175a0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / aws_mfa_login-1.0.1-py3-none-any.whl

Download URL aws_mfa_login-1.0.1-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
419b7a75880037481cdb187a10ca98b841f8776ec4898a800afd846057309226
BLAKE2b-256 checksum
How to use checksums
a379f89972a577ecf20ca1c37610d0fe4600d61218f302f324bb3aed690109f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.1 This release

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