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.
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-0.3.2.tar.gz
.
File metadata
- Download URL: awscli_mate-0.3.2.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d43578cb94ea35c20893efe91b7185c77c160ca0bf5404c01d28e56696f833b |
|
MD5 | 64f47e2dbdb7f4d6509cbbaa0abef07c |
|
BLAKE2b-256 | 20c0cfe799effec43d643e6e769f22483c90fee19acb1bd0e4aed73e25087404 |
File details
Details for the file awscli_mate-0.3.2-py2.py3-none-any.whl
.
File metadata
- Download URL: awscli_mate-0.3.2-py2.py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b68d2a4e250df504f0d3ba38c5ac9a41bd1b50ca2700025ddeb5ac02df6821a1 |
|
MD5 | 761e017e476aaeb943d884c83e1df9c9 |
|
BLAKE2b-256 | fb6de1c62e001737033e0c4a99b0226a44ca189b1539e258f5ca9001d4241878 |