CLI Reference

This page provides documentation for our command line tools.

awstools

Usage:

awstools [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--profile text AWS profile None
--region text AWS region None
--debug boolean set debug mode False
--help boolean Show this message and exit. False
acm

ACM related commands

Usage:

awstools acm [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# list

list certificates

Usage:

awstools acm list [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False
ce

Cost Explorer related commands

Usage:

awstools ce [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# get-cost

Usage:

awstools ce get-cost [OPTIONS]

Options:

Name Type Description Default
--start text Sets the start date (inclusive) in YYYY-MM-DD format - default: 30 days ago None
--end text Sets the end date (exclusive) in YYYY-MM-DD format - default: today None
--granularity choice (DAILY | MONTHLY | HOURLY) Sets the Amazon Web Services cost granularity DAILY
--help boolean Show this message and exit. False
ec2

EC2 related commands

Usage:

awstools ec2 [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# ami

EC2 AMI related commands

Usage:

awstools ec2 ami [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
## add-launchpermissions

Usage:

awstools ec2 ami add-launchpermissions [OPTIONS] AMI

Options:

Name Type Description Default
--account text Add account to LaunchPermissions []
--help boolean Show this message and exit. False
## create-image

create an AMI from an instance

Usage:

awstools ec2 ami create-image [OPTIONS] INSTANCE_ID AMI_NAME

Options:

Name Type Description Default
--reboot boolean create AMI rebooting instance False
--description text AMI description None
--help boolean Show this message and exit. False
## launch-permissions

Usage:

awstools ec2 ami launch-permissions [OPTIONS] AMI

Options:

Name Type Description Default
--help boolean Show this message and exit. False
## show

Usage:

awstools ec2 ami show [OPTIONS] AMI

Options:

Name Type Description Default
--no-title boolean don't show column description False
--help boolean Show this message and exit. False
# asg

EC2 ASG related commands

Usage:

awstools ec2 asg [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
## detach-instances

Usage:

awstools ec2 asg detach-instances [OPTIONS] NAME

Options:

Name Type Description Default
--instance text N/A []
--decrement_asg boolean decrement ASG capacity False
--help boolean Show this message and exit. False
## list

list ASGs

Usage:

awstools ec2 asg list [OPTIONS] [NAME]

Options:

Name Type Description Default
--no-title boolean don't show column description False
--help boolean Show this message and exit. False
## list-instance-refreshes

Show status instance refresh

Usage:

awstools ec2 asg list-instance-refreshes [OPTIONS] NAME

Options:

Name Type Description Default
--no-title boolean don't show column description False
--help boolean Show this message and exit. False
## list-instances

list instances belonging to a specific ASG

Usage:

awstools ec2 asg list-instances [OPTIONS] NAME

Options:

Name Type Description Default
--no-title boolean don't show column description False
--help boolean Show this message and exit. False
## set-capacity

set ASG desired capacity (optionally can also set max and min size)

Usage:

awstools ec2 asg set-capacity [OPTIONS] NAME CAPACITY

Options:

Name Type Description Default
--max-size integer ASG max size -1
--min-size integer ASG min size -1
--honor-cooldown boolean honor cooldown False
--terminate boolean terminate instances False
--force boolean set min and max size to capacity False
--help boolean Show this message and exit. False
## set-healthy

set instances as healthy

Usage:

awstools ec2 asg set-healthy [OPTIONS] NAME

Options:

Name Type Description Default
--ip text IP to show None
--help boolean Show this message and exit. False
## set-max

set ASG max size

Usage:

awstools ec2 asg set-max [OPTIONS] NAME MAX

Options:

Name Type Description Default
--help boolean Show this message and exit. False
## set-min

set ASG min size

Usage:

awstools ec2 asg set-min [OPTIONS] NAME MIN

Options:

Name Type Description Default
--help boolean Show this message and exit. False
## set-unhealthy

set instances as unhealthy

Usage:

awstools ec2 asg set-unhealthy [OPTIONS] NAME

Options:

Name Type Description Default
--ip text IP to show None
--help boolean Show this message and exit. False
## start-instance-refresh

start an instance refresh

Usage:

awstools ec2 asg start-instance-refresh [OPTIONS] NAME

Options:

Name Type Description Default
--help boolean Show this message and exit. False
## suspended-processes

Show suspended processes of a ASG

Usage:

awstools ec2 asg suspended-processes [OPTIONS] [NAME]

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# az

list available AZs

Usage:

awstools ec2 az [OPTIONS] [REGION]

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# cpucredits

retrieve InstanceCreditSpecifications

Usage:

awstools ec2 cpucredits [OPTIONS] [NAME]

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# cssh

multiple ssh to EC2 instances by name

Usage:

awstools ec2 cssh [OPTIONS] HOST COMMAND

Options:

Name Type Description Default
--no-instance-id boolean connect to any host that matches False
--ip text IP to use for ssh None
--help boolean Show this message and exit. False
# current-price

Usage:

awstools ec2 current-price [OPTIONS] INSTANCE_TYPE

Options:

Name Type Description Default
--os choice (Linux | Windows | Red Hat Enterprise Linux with HA | RHEL | SUSE) Operating System Linux
--preinstalled-software choice (NA | SQL Ent | SQL Std | SQL Web) Preinstalled Software NA
--tenancy choice (Shared | Dedicated | Host) Tenancy Shared
--byol boolean Bring your own license False
--help boolean Show this message and exit. False
# ebs

EC2 EBS related commands

Usage:

awstools ec2 ebs [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
## delete

delete volumes

Usage:

awstools ec2 ebs delete [OPTIONS] [NAME]

Options:

Name Type Description Default
--available boolean only available volumes False
--sure boolean shut up BITCH! I known what I'm doing False
--help boolean Show this message and exit. False
## list

list volumes

Usage:

awstools ec2 ebs list [OPTIONS] [NAME]

Options:

Name Type Description Default
--available boolean only available volumes False
--help boolean Show this message and exit. False
# import-keypair

import a keypair from a public key file

Usage:

awstools ec2 import-keypair [OPTIONS] KEYPAIR

Options:

Name Type Description Default
--pub-file filename public side to import <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>
--help boolean Show this message and exit. False
# instance-tags

show instance tags

Usage:

awstools ec2 instance-tags [OPTIONS] INSTANCE_ID

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# interfaces

list ENI per instance

Usage:

awstools ec2 interfaces [OPTIONS] [NAME]

Options:

Name Type Description Default
--no-title boolean don't show column description False
--help boolean Show this message and exit. False
# lb

EC2 Load Balancer related commands

Usage:

awstools ec2 lb [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
## delete

Delete EC2 Load Balancers

Usage:

awstools ec2 lb delete [OPTIONS] NAME

Options:

Name Type Description Default
--sure boolean shut up BITCH! I known what I'm doing False
--help boolean Show this message and exit. False
## list

List EC2 Load Balancers

Usage:

awstools ec2 lb list [OPTIONS] [NAME]

Options:

Name Type Description Default
--no-title boolean don't show column description False
--help boolean Show this message and exit. False
# list

list EC2 running instances

Usage:

awstools ec2 list [OPTIONS] [NAME]

Options:

Name Type Description Default
--all boolean show all instances - default is to list just running instances False
--connect boolean connect to this instance False
--any boolean connect to any host that matches False
--terminate boolean terminate any instance that matches False
--ip text IP to use for ssh None
--help boolean Show this message and exit. False
# nat-gateways

list NAT Gateways

Usage:

awstools ec2 nat-gateways [OPTIONS] [NAME]

Options:

Name Type Description Default
--no-title boolean don't show column description False
--help boolean Show this message and exit. False
# scp

copy data from/to EC2 instance by name

Usage:

awstools ec2 scp [OPTIONS] HOST FILE [TARGET]

Options:

Name Type Description Default
--no-instance-id boolean connect to any host that matches False
--ip text IP to use for ssh None
--help boolean Show this message and exit. False

list EC2 running instances

Usage:

awstools ec2 search [OPTIONS] [NAME]

Options:

Name Type Description Default
--all boolean show all instances - default is to list just running instances False
--connect boolean connect to this instance False
--any boolean connect to any host that matches False
--terminate boolean terminate any instance that matches False
--ip text IP to use for ssh None
--help boolean Show this message and exit. False
# sg

EC2 SG related commands

Usage:

awstools ec2 sg [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
## delete-entangled

delete entangled SGs

Usage:

awstools ec2 sg delete-entangled [OPTIONS] NAME

Options:

Name Type Description Default
--help boolean Show this message and exit. False
## list

list SGs

Usage:

awstools ec2 sg list [OPTIONS] NAME

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# spot

EC2 spot instances

Usage:

awstools ec2 spot [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
## current-price

get current spot price

Usage:

awstools ec2 spot current-price [OPTIONS] INSTANCE_TYPE

Options:

Name Type Description Default
--product text product description ['Linux/UNIX (Amazon VPC)']
--help boolean Show this message and exit. False
# ssh

ssh to a EC2 instance by name

Usage:

awstools ec2 ssh [OPTIONS] HOST [COMMAND]

Options:

Name Type Description Default
--any boolean connect to any host that matches False
--ip text IP to use for ssh None
--help boolean Show this message and exit. False
# start

start EC2 instances by name

Usage:

awstools ec2 start [OPTIONS] NAME

Options:

Name Type Description Default
--sure boolean shut up BITCH! I known what I'm doing False
--help boolean Show this message and exit. False
# stop

stop EC2 instances by name

Usage:

awstools ec2 stop [OPTIONS] NAME

Options:

Name Type Description Default
--sure boolean shut up BITCH! I known what I'm doing False
--help boolean Show this message and exit. False
# subnet

list subnets

Usage:

awstools ec2 subnet [OPTIONS] [NAME]

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# terminate

terminate EC2 instances by name

Usage:

awstools ec2 terminate [OPTIONS] NAME...

Options:

Name Type Description Default
--sure boolean shut up BITCH! I known what I'm doing False
--help boolean Show this message and exit. False
eks

EKS related commands

Usage:

awstools eks [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# deregister

deregister cluster

Usage:

awstools eks deregister [OPTIONS] CLUSTER

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# describe

get Issuer URL

Usage:

awstools eks describe [OPTIONS] CLUSTER

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# get-connector-manifest

retrieve EKS-connector manifest

Usage:

awstools eks get-connector-manifest [OPTIONS] ID CODE

Options:

Name Type Description Default
--role text role ARN to retrieve cluster info None
--help boolean Show this message and exit. False
# get-issuer-url

get Issuer URL

Usage:

awstools eks get-issuer-url [OPTIONS] CLUSTER

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# list

list EKS clusters

Usage:

awstools eks list [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# register

register cluster

Usage:

awstools eks register [OPTIONS] CLUSTER

Options:

Name Type Description Default
--provider choice (EKS_ANYWHERE | OPENSHIFT | OTHER) Operating System EKS_ANYWHERE
--role text role ARN, please see https://docs.aws.amazon.com/eks/latest/userguide/connector_IAM_role.html None
--no-title boolean don't show column description False
--help boolean Show this message and exit. False
# update-kubeconfig

import EKS cluster context to kubectl

Usage:

awstools eks update-kubeconfig [OPTIONS] CLUSTER

Options:

Name Type Description Default
--kubeconfig text kubeconfig file ``
--help boolean Show this message and exit. False
elasticache

elasticache related commands

Usage:

awstools elasticache [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# list

list elasticache clusters

Usage:

awstools elasticache list [OPTIONS] [NAME]

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# reboot

reboot elasticache clusters

Usage:

awstools elasticache reboot [OPTIONS] [NAME]

Options:

Name Type Description Default
--help boolean Show this message and exit. False
iam

IAM related commands

Usage:

awstools iam [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# role

list IAM roles

Usage:

awstools iam role [OPTIONS] [NAME]

Options:

Name Type Description Default
--prefix text use prefix /
--help boolean Show this message and exit. False
kms

KMS related commands

Usage:

awstools kms [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# get-key-policies

get key policies

Usage:

awstools kms get-key-policies [OPTIONS] KEY

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# get-key-policy

get key policy

Usage:

awstools kms get-key-policy [OPTIONS] KEY POLICY

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# list

list keys

Usage:

awstools kms list [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# set-key-policy

set key policy

Usage:

awstools kms set-key-policy [OPTIONS] KEY POLICY

Options:

Name Type Description Default
--policy-file filename file to read json data from <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>
--help boolean Show this message and exit. False
rds

RDS related commands

Usage:

awstools rds [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# list

list db instances

Usage:

awstools rds list [OPTIONS] [NAME]

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# reboot

Usage:

awstools rds reboot [OPTIONS] [NAME]

Options:

Name Type Description Default
--sure boolean shut up BITCH! I known what I'm doing False
--help boolean Show this message and exit. False
# snapshots

RDS snapshots related commands

Usage:

awstools rds snapshots [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
## create

Usage:

awstools rds snapshots create [OPTIONS] DBINSTANCE SNAPSHOTNAME

Options:

Name Type Description Default
--help boolean Show this message and exit. False
## show

Usage:

awstools rds snapshots show [OPTIONS] DBNAME

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# start

Usage:

awstools rds start [OPTIONS] [NAME]

Options:

Name Type Description Default
--sure boolean shut up BITCH! I known what I'm doing False
--help boolean Show this message and exit. False
# stop

Usage:

awstools rds stop [OPTIONS] [NAME]

Options:

Name Type Description Default
--sure boolean shut up BITCH! I known what I'm doing False
--help boolean Show this message and exit. False
route53

Route53 related commands

Usage:

awstools route53 [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# delete-record

delete DNS record from hosted zone

Usage:

awstools route53 delete-record [OPTIONS] ZONE_ID RECORD_NAME

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# export-records

export zone records to JSON

Usage:

awstools route53 export-records [OPTIONS] ZONE_ID

Options:

Name Type Description Default
--include-not-importable boolean include NS and SOA records False
--exclude-domain-aws-validation boolean exclude .acm-validations.aws. records False
--domain-aws-validation boolean only include .acm-validations.aws. records False
--match-records text select specific records ``
--help boolean Show this message and exit. False
# get-record

Fins DNS record

Usage:

awstools route53 get-record [OPTIONS] FQDN

Options:

Name Type Description Default
--public boolean show only public zones False
--private boolean show only private zones False
--exact boolean show only exact matches False
--no-title boolean don't show column description False
--type text show only this type []
--help boolean Show this message and exit. False
# import-records

import zone records from file or stdin in JSON format

Usage:

awstools route53 import-records [OPTIONS] ZONE_ID

Options:

Name Type Description Default
--import-file filename file to read json data from <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>
--tr text original zone name ``
--tr-hz text original hosted zone id ``
--help boolean Show this message and exit. False
# list

list route53 zones

Usage:

awstools route53 list [OPTIONS]

Options:

Name Type Description Default
--max-zones text max number of zones 100
--public boolean show only public zones False
--private boolean show only private zones False
--help boolean Show this message and exit. False
s3

S3 utilities

Usage:

awstools s3 [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--endpoint text URL S3 endpoint None
--access-key text S3 access key None
--secret text S3 secret for the access key None
--help boolean Show this message and exit. False
# create-bucket

create new bucket

Usage:

awstools s3 create-bucket [OPTIONS] BUCKET

Options:

Name Type Description Default
--region text region None
--help boolean Show this message and exit. False
# delete

delete bucket

Usage:

awstools s3 delete [OPTIONS] BUCKET

Options:

Name Type Description Default
--sure boolean shut up BITCH! I known what I'm doing False
--help boolean Show this message and exit. False
# list

list S3 buckets

Usage:

awstools s3 list [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# ls

list bucket contents

Usage:

awstools s3 ls [OPTIONS] BUCKET

Options:

Name Type Description Default
--path text path /
--help boolean Show this message and exit. False
# purge

delete all objects and versions

Usage:

awstools s3 purge [OPTIONS] BUCKET

Options:

Name Type Description Default
--sure boolean shut up BITCH! I known what I'm doing False
--delete boolean delete bucket False
--help boolean Show this message and exit. False
sm

SM SecretManager related commands

Usage:

awstools sm [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# list

list secrets

Usage:

awstools sm list [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# search

search secrets

Usage:

awstools sm search [OPTIONS] NAME

Options:

Name Type Description Default
--help boolean Show this message and exit. False
ssm

SSM Systems Manager related commands

Usage:

awstools ssm [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# delete

delete parameter

Usage:

awstools ssm delete [OPTIONS] PARAMETER

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# get

get parameter

Usage:

awstools ssm get [OPTIONS] PARAMETER

Options:

Name Type Description Default
--output-json boolean output as JSON False
--output-k8s-secret boolean output as JSON False
--k8s-secret-name text Rename parameter to None
--help boolean Show this message and exit. False
# list

list parameters

Usage:

awstools ssm list [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False
# put

import parameter from JSON

Usage:

awstools ssm put [OPTIONS]

Options:

Name Type Description Default
--import-file filename file to read json data from <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>
--rename text Rename parameter to None
--overwrite boolean overwrite parameter False
--key text KMS Key to use alias/aws/ssm
--help boolean Show this message and exit. False
# set

set SecureString parameter

Usage:

awstools ssm set [OPTIONS] PARAMETER VALUE

Options:

Name Type Description Default
--description text parameter description ``
--overwrite boolean overwrite parameter False
--key text KMS Key to use alias/aws/ssm
--help boolean Show this message and exit. False