CLI tool for AWS configuration files and quick interogations to AWS API
Project description
Install
# Install or update it from pip
pip install -U kpx
# Install or update it from gitlab
pip install -U kpx --index-url https://gitlab.com/api/v4/projects/24038501/packages/pypi/simple
Contribute
curl -sSL https://install.python-poetry.org | python3 -
Clone the project
git clone https://gitlab.com/kisphp/python-cli-tool.git
Create virtual env inside the project directory
cd python-cli-tool
# create venv
python3 -m venv venv # first venv is the python module called venv, second one is the name of our local virtual environment
Install local dependencies
poetry install
Run application from poetry
poetry run -- kpx # this will show the full list of available commands
poetry run -- kpx ec2 # will list all ec2 instances in your aws account
poetry run -- kpx ec2 -f name=gpu,state=running # list ec2 instances with filtered results
Exit from virtual environment
deactivate # type this in the terminal window and click Enter key
kpx
KPX application for aws profiles
Usage:
$ kpx [OPTIONS] COMMAND [ARGS]...
Options:
--install-completion
: Install completion for the current shell.--show-completion
: Show completion for the current shell, to copy it or customize the installation.--help
: Show this message and exit.
Commands:
cfg
: Configure ~/.aws/config file with profiles...cred
: Configure ~/.aws/credentials file with aws...ec2
: List EC2 instancesecr
: List ECR repositorieslb
: List Load Balancersn
: List EKS nodes and show some information...nodes
: List EKS nodes and show some information...r53
: List Route53 hosted zonessec
: List secrets and show valuessecret
: List secrets and show valuesv
: Show current CLI tool versionversion
: Show current CLI tool versionvpc
: List VPCs and show Cidr blocks or subnets...
kpx cfg
Configure ~/.aws/config file with profiles settings
Usage:
$ kpx cfg [OPTIONS] [AWS_PROFILE] [REGION] [OUTPUT]
Arguments:
[AWS_PROFILE]
: [default: default][REGION]
: [default: us-east-1][OUTPUT]
: [default: json]
Options:
--help
: Show this message and exit.
kpx cred
Configure ~/.aws/credentials file with aws credentials
Usage:
$ kpx cred [OPTIONS] [AWS_PROFILE] [KEY] [SECRET]
Arguments:
[AWS_PROFILE]
: [default: default][KEY]
[SECRET]
Options:
--help
: Show this message and exit.
kpx ec2
List EC2 instances
Usage:
$ kpx ec2 [OPTIONS]
Options:
-f, --filter TEXT
--help
: Show this message and exit.
kpx ecr
List ECR repositories
Usage:
$ kpx ecr [OPTIONS] [REPO_NAME]
Arguments:
[REPO_NAME]
Options:
--help
: Show this message and exit.
kpx lb
List Load Balancers
Usage:
$ kpx lb [OPTIONS]
Options:
--help
: Show this message and exit.
kpx n
List EKS nodes and show some information about them
Usage:
$ kpx n [OPTIONS]
Options:
-f, --filter TEXT
--help
: Show this message and exit.
kpx nodes
List EKS nodes and show some information about them
Usage:
$ kpx nodes [OPTIONS]
Options:
-f, --filter TEXT
--help
: Show this message and exit.
kpx r53
List Route53 hosted zones
Usage:
$ kpx r53 [OPTIONS] [ZONE_ID] [FILTER]
Arguments:
[ZONE_ID]
[FILTER]
Options:
--help
: Show this message and exit.
kpx sec
List secrets and show values
Usage:
$ kpx sec [OPTIONS] [SECRET]
Arguments:
[SECRET]
Options:
-a, --all-namespaces
: Show K8S secrets in all namespaces-n, --namespace TEXT
: Select namespace--help
: Show this message and exit.
kpx secret
List secrets and show values
Usage:
$ kpx secret [OPTIONS] [SECRET]
Arguments:
[SECRET]
Options:
-a, --all-namespaces
: Show K8S secrets in all namespaces-n, --namespace TEXT
: Select namespace--help
: Show this message and exit.
kpx v
Show current CLI tool version
Usage:
$ kpx v [OPTIONS]
Options:
--help
: Show this message and exit.
kpx version
Show current CLI tool version
Usage:
$ kpx version [OPTIONS]
Options:
--help
: Show this message and exit.
kpx vpc
List VPCs and show Cidr blocks or subnets for provided VPC ID
Usage:
$ kpx vpc [OPTIONS] [VPC_ID]
Arguments:
[VPC_ID]
Options:
--help
: Show this message and exit.
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.