awsuse
A CLI tool to easily switch the AWS CLI active default profile by changing directly the ~/.aws/config and the ~/.aws/credentials file.
Instalation
pip install awsuse
Usage
awsuse --help
Usage: awsuse [OPTIONS] SOURCE_PROFILE
Options:
--credentials-file PATH Path to aws cli credentials file
--config-file PATH Path to aws cli config file
--token-code TEXT MFA token code (applicable on MFA based
profiles)
--session-duration INTEGER Session duration in seconds (applicable on MFA
based profiles)
--help Show this message and exit.
Supported profile types
- Simple profiles
- MFA Profiles
- SSO profiles
Simple profiles
These are simple profiles that define only the aws_access_key_id and aws_secret_access_key credentials.
For these, it just copies the profile values defined in both credentials and config file into those files [default] section
MFA profiles
These are profiles that contain the key mfa_serial defined in the config file.
It uses the SOURCE_PROFILE definition, the token code (--token-code) to get a new session token with credentials from AWS STS and writes them into the [default] section of the credentials file. It also copies the profile configs into the config file [default] section
SSO profiles
These are profiles that contain the key sso_session defined in the config file.
For these profiles this CLI ony copies the profile config settings into the [default] section.
If the specified sso_session is expired, this CLI will not try to refresh it automaticaly.
Metadata
Release files for awsuse 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| awsuse-0.1.2.tar.gz | 10.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| awsuse-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.4 kB
Release files / awsuse-0.1.2.tar.gz
| Download URL | awsuse-0.1.2.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f5c467a7bb22f12408e451ea0748f362f9cc20ea22db52afd18ba4005c00750
|
|
BLAKE2b-256 checksum How to use checksums |
1d270466b826233f05898c9d06ec242d7d5db95942d59eda7f45be5db1b32086
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.2 Darwin/21.2.0
|
Release files / awsuse-0.1.2-py3-none-any.whl
| Download URL | awsuse-0.1.2-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6617d82d74a2031e3569b68ebda4b3fdec4a62a473e36375e698e080a685a62
|
|
BLAKE2b-256 checksum How to use checksums |
abcafd8258979ab79afcb15a5c5fbc7698c6ced907d330f990cc425fed69e2af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.2 Darwin/21.2.0
|