A library to setup an AWS CLI profile for an account with MFA enabled
Project description
AWS STS Get MFA Profile
Use this package to automatically setup an MFA enabled profile for AWS CLI
- Install AWS CLI
- Sign up for MFA in the AWS IAM Management console (if you haven't already) and note the MFA ARN.
- Create an access key in the AWS IAM Management console (if you haven't already) and note the access key id and secret.
- Create a credential text file profile in your home directory (
'C:\Users\SamuelMercer\.aws\credentials'
) by running
aws configure --profile mfa
- Add your
mfa_serial
manually by running
aws configure set mfa_serial --profile mfa "arn:aws:iam::467792...:mfa/..."
- Install the python package using pip
> python -m pip install aws-sts-get-mfa-profile
- Run the script
get-sts-token.py
using the required length of token in seconds (don't do more than 1 day == 86400 seconds)
> get-sts-token.py
- When making AWS CLI calls from now on it should work, e.g.
> aws iam list-users
{
"Users": [
{
...
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aws-sts-get-mfa-profile-1.2.2.tar.gz
.
File metadata
- Download URL: aws-sts-get-mfa-profile-1.2.2.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e867a04d682854e64f11f03e73f0cd7e303d2ed393801df2cf8384af077feff |
|
MD5 | 9b000927a1ef22ddc1bbcd07cf5ab6df |
|
BLAKE2b-256 | 475bcb291711e7cca117b9d6f7f4de9633ed94da85fb7a201a01d3d901c1c053 |
File details
Details for the file aws_sts_get_mfa_profile-1.2.2-py3-none-any.whl
.
File metadata
- Download URL: aws_sts_get_mfa_profile-1.2.2-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f9997536b071c2d81ba60de9a3a2600d5d2a569d905b682412e91df4cd33423 |
|
MD5 | f7086103bd5b7f0ad7972f3f6b7a3ce5 |
|
BLAKE2b-256 | ccd49abb9f553d52405f02b2008f5295d52e30a09dae555035b6b1fced16fa43 |