AWS CLI improvement.
Project description
Welcome to awscli_mate Documentation
awscli_mate improves the original AWS CLI.
Make sure you have done:
pip install awscli_mate pip install boto3 pip install fire
Set AWS Profile as Default
It is very common that you wants to set a profile as the default when using a tools that doesn’t support explicit --profile ... argument. awscli_mate provides a command to do this for you. It will update your .aws/config and .aws/credentials file and set the default profile to the one you specified.
Example:
awscli_mate set_profile_as_default --profile=your_profile
One Click MFA auth
Based on this AWS re:Post How do I use an MFA token to authenticate access to my AWS resources through the AWS CLI?, you have to run aws sts get-session-token ... command to get some token, and manually copy and paste them to either environment variable or .aws/credentials file. This is a bit tedious. awscli_mate provides a one-click command to do this for you. Basically, it will use a base profile to get the token, let’s say it is your_profile, and automatically create / update a new profile called your_profile_mfa in your .aws/config and .aws/credentials file. So you can keep using the your_profile_mfa in your application.
Example:
awscli_mate mfa_auth --profile=your_profile --mfa_code=123456 --hours=12 --overwrite_default=True
Note that this command also automatically set the MFA profile as default profile. If you don’t want to set the your_profile_mfa as default profile automatically, you can just remove the --overwrite_default part.
Use awscli_mate as a Python Library
See example.
Use awscli_mate as a Interactive CLI
Set named AWS Profile as default
Do MFA Authentication
Keyboard shortcuts:
hit Ctrl + E or UP to move item selection up.
hit Ctrl + R to scroll item selection up.
hit Ctrl + D or DOWN to move item selection up.
hit Ctrl + F to scroll item selection up.
hit Ctrl + H or LEFT to move query input cursor to the left (this won’t work on Windows).
hit Ctrl + L or RIGHT to move query input cursor to the right.
hit Ctrl + G to move query input cursor to the previous word.
hit Ctrl + K to move query input cursor to the next word.
hit Ctrl + X to clear the query input.
hit Tab to auto-complete.
hit BACKSPACE to delete query input backward.
hit DELETE to delete query input forward.
hit Enter to run it.
Install
awscli_mate is released on PyPI, so all you need is:
$ pip install awscli_mate
To upgrade to latest version:
$ pip install --upgrade awscli_mate
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
File details
Details for the file awscli_mate-1.1.1.tar.gz
.
File metadata
- Download URL: awscli_mate-1.1.1.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5640352442401dfc1598a698e5f8468d8d494c6d70dd6e78bd4201453a380103 |
|
MD5 | d98b9c6a4c2c8abe121715e00b626646 |
|
BLAKE2b-256 | 8fe88eac296a1874d1b815a7ca0afb62f0bf6980b6d48230ae6f6e134c07c0aa |
File details
Details for the file awscli_mate-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: awscli_mate-1.1.1-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 548d13352d180924ba6043716e8e8b05432818cebbd8593cd3f84c8cff397f16 |
|
MD5 | 9be5cfa398127902d2bec3796f5517d3 |
|
BLAKE2b-256 | fae85e7eb32e9f2d0f66141b1601b4a75fccbede02bf70d70a6879b5755b1e79 |