aws-mfa-session
A command line utility to generate temporary AWS credentials with virtual MFA device. Credentials could be exported into new shell or inserted into aws credentials file.
Features
- support only virtual MFA devices (current limitation of API)
- select any profile from credential file
- detect MFA device from user profile
- generate temporary credentials (using sts)
- update profile in the credential file with generated credentials
Release page distributions
Github Release page provides binaries for:
- Windows
- Linux
- macOS
Examples
Generate session credentials with default profile, and print the credentials as exported environment variables
Could be used to inject variables into the current shell
Generate session credentials with default profile and MFA arn:
Generate session credentials with default profile and non-default region:
Generate session credentials with default profile, and run a new shell with new shell with exported environment variables
Generate session credentials with default profile, and create or update a new profile:
Generate session credentials with defined profile, and create or update a new profile:
Generate session credentials with defined profile and non-default credential file, and create or update a new profile:
How to build and install
Requirements: rust and cargo
# Build
# Install from local source
# Install latest from git
# Install from crate package