STS MFA CLI
Source Code: https://github.com/browniebroke/stsmfa-cli
Creating temporary profiles for multi-factor auth (MFA) protected accounts using AWS STS is too hard. This is a small CLI that helps with that.
Installation
Via Homebrew:
brew install browniebroke/tap/stsmfa-cli
Via uv, or your favourite Python package manager:
uv tool install stsmfa-cli
Usage
The CLI is a simple command stsmfa that creates a profile for a temporary session protected by MFA.
Assuming your ~/.aws/credentials file looks like this:
[my-profile-name]
aws_access_key_id = AKIAXXXXX
aws_secret_access_key = xxxx
mfa_serial = arn:aws:iam::123456789010:mfa/first.last
When running, for example:
awsmfa --profile my-profile-name 123456
This will create a session using the MFA serial defined under my-profile-name with the one-time password 123456, and save the required AWS key, secret and token under as a new profile my-profile-name-mfa in you ~/.aws/credentials file.
Now to use that session, you just need to set AWS_PROFILE=my-profile-name-mfa.
If your MFA serial is defined under the default profile, you don't need to specify the --profile option.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Bruno Alla 💻 🤔 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Credits
This package was created with Copier and the browniebroke/pypackage-template project template.
Release files for stsmfa-cli 1.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stsmfa_cli-1.8.0.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stsmfa_cli-1.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.2 kB
Release files / stsmfa_cli-1.8.0.tar.gz
| Download URL | stsmfa_cli-1.8.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6a4883e921b593be095a22d1ba94ac233e7348d48090780f1ecf3a4db8cc2ed
|
|
BLAKE2b-256 checksum How to use checksums |
810bc0041640cff31ec29880d7e03904216d7ff8ce6fbb26d09ae791a37a03e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.
Transparency logRelease files / stsmfa_cli-1.8.0-py3-none-any.whl
| Download URL | stsmfa_cli-1.8.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
093b3b49931a1fca1dd603febd633329f22541899f3a5578ff682fa9c2f0a210
|
|
BLAKE2b-256 checksum How to use checksums |
0f7c7465d495d25c03b033a3307a025724c8ca08b777a48cd5c136c8d06e03d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.
Transparency log