awsuser
AWS credential_process tool that authenticates IAM users with password + MFA via Console sign-in. Uses a headless browser to automate login and extract temporary credentials — no pre-existing access keys needed.
Installation
pip install awsuser
playwright install chromium
Note: On macOS and Windows,
awsuseruses your installed Google Chrome by default. You only needplaywright install chromiumif Chrome isn't installed.
Quick Start
# 1. Setup a profile (writes credential_process to ~/.aws/credentials)
awsuser -a 123456789012 -u alice -p myprofile
# 2. Use it — awsuser is called automatically by the AWS CLI
aws s3 ls --profile myprofile
When the AWS CLI needs credentials, it calls awsuser which:
- Returns cached credentials if still valid
- Otherwise opens a GUI prompt for MFA (password comes from keyring)
- Automates Console sign-in in a headless browser
- Extracts credentials from CloudShell and caches them
Usage
# Setup a profile
awsuser -a 123456789012 -u alice -p myprofile
# Save password to keyring (avoids password prompt on future runs)
awsuser -a 123456789012 -u alice --save
# Watch the browser during sign-in (debugging)
awsuser -a 123456789012 -u alice --watch
# Use a specific browser
awsuser -a 123456789012 -u alice --browser firefox
How It Works
- AWS CLI calls
awsuserviacredential_process - Checks disk cache (
~/.awsuser/cache/) — returns immediately if valid - If expired: opens a GUI window for MFA code (password from keyring or GUI)
- Automates Console sign-in in a headless browser
- Opens CloudShell and runs
aws configure export-credentials - Caches and returns credentials as JSON to the AWS CLI
Running Tests
./run_tests.sh
Documentation
License
MIT
Disclaimer
This tool automates the AWS Console sign-in flow using browser automation. It relies on the Console's UI structure which AWS may change without notice. If the tool stops working after an AWS Console update, please open an issue.
Metadata
Release files for awsuser 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| awsuser-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for awsuser-1.0.1-py3-none-any.whl |
Release files / awsuser-1.0.1-py3-none-any.whl
| Download URL | awsuser-1.0.1-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66787903b949968f05feb41cf49f4e96e943ddcbd1716d75026f5da6f544869a
|
|
BLAKE2b-256 checksum How to use checksums |
989b5b2a04b1ee6ca46767b7410932b0598d0dc82201df65ecf88374a72f1bbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for awsuser 1.0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.