CLI to switch the aws cli default profile quickly
Project description
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.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file awsuse-0.1.2.tar.gz.
File metadata
- Download URL: awsuse-0.1.2.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.2 Darwin/21.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f5c467a7bb22f12408e451ea0748f362f9cc20ea22db52afd18ba4005c00750
|
|
| MD5 |
29bdf067b0405e91d11b8db91a39468b
|
|
| BLAKE2b-256 |
1d270466b826233f05898c9d06ec242d7d5db95942d59eda7f45be5db1b32086
|
File details
Details for the file awsuse-0.1.2-py3-none-any.whl.
File metadata
- Download URL: awsuse-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.2 Darwin/21.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6617d82d74a2031e3569b68ebda4b3fdec4a62a473e36375e698e080a685a62
|
|
| MD5 |
b387f44ea996bd2e72d5fbbad66c5b40
|
|
| BLAKE2b-256 |
abcafd8258979ab79afcb15a5c5fbc7698c6ced907d330f990cc425fed69e2af
|