Skip to main content

AWS CLI improvement.

Project description

https://github.com/MacHu-GWU/awscli_mate-project/workflows/CI/badge.svg https://codecov.io/gh/MacHu-GWU/awscli_mate-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/awscli_mate.svg https://img.shields.io/pypi/l/awscli_mate.svg https://img.shields.io/pypi/pyversions/awscli_mate.svg https://img.shields.io/badge/Release_History!--None.svg?style=social https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

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

https://github.com/MacHu-GWU/awscli_mate-project/assets/6800411/c031a52a-2b4e-4dde-85f1-ab558aa1644f

Do MFA Authentication

https://github.com/MacHu-GWU/awscli_mate-project/assets/6800411/5cc9ddef-18a5-4d76-942f-4be1e97601aa

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

awscli_mate-1.1.2.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

awscli_mate-1.1.2-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file awscli_mate-1.1.2.tar.gz.

File metadata

  • Download URL: awscli_mate-1.1.2.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.13

File hashes

Hashes for awscli_mate-1.1.2.tar.gz
Algorithm Hash digest
SHA256 0f7124884345076f29b9a446cbaff7d9119f5c7afa12820ca9084ba9ce03cce4
MD5 d11faded0c7ee06c7fa85eae918dbcd2
BLAKE2b-256 71b22aeb4723c1a5aa31e1678c790636c640de150bc8d12db51ff954498e3c0c

See more details on using hashes here.

File details

Details for the file awscli_mate-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: awscli_mate-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.13

File hashes

Hashes for awscli_mate-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 900d758dccd2fe1e673fb169e71294de08094c90eef0a5ca427b9e5fc42d9812
MD5 505850c09f76f3cb763041397b7887ee
BLAKE2b-256 c33e3c04a21c714e6d6fa57675c936bbcc967b01bb16fe75dc5ad95cd6b398c4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page