Skip to main content

AWS EC2 CLI

Project description

AWS EC2 CLI

Build Release PyPI version

"Instead of using the console, use the cli!".

Command-line tools for managing pet EC2 instances by name.

Defaults only need to be supplied once via a config file, which supports multiple profiles for different regions or AWS accounts.

For examples see:

  • EC2 - manipulate EC2 instances by name, and launch them with tags and EBS volumes of any size, as per the settings in the configuration file (subnet, security group etc).
  • AMI - describe, delete and share images
  • Compute Optimizer - show over-provisioned instances
  • SSM - run commands on instances, and ssm patch management

Prerequisites

  • python 3.8+

Install

Run the following to install the latest master version using pip:

pip install aec-cli

If you have previously installed aec, run the following to upgrade to the latest version:

pip install --upgrade aec-cli

NB: Consider using pipx to install aec-cli into its own isolated virtualenv.

Configure

Before you can use aec, you will need to create the config files in ~/.aec/. The config files contain settings for your AWS account including VPC details and additional tagging requirements.

To get started, run aec configure example to install the example config files and then update them as needed.

Handy aliases

For even faster access to aec subcommands, you may like to add the following aliases to your .bashrc:

alias ec2='COLUMNS=$COLUMNS aec ec2'
alias ami='COLUMNS=$COLUMNS aec ami'
alias ssm='COLUMNS=$COLUMNS aec ssm'

COLUMNS=$COLUMNS will ensure output is formatted to the width of your terminal when piped.

FAQ

How do I use aec with other AWS profiles?

To use aec with the named profile 'production':

export AWS_DEFAULT_PROFILE=production
aec ec2 describe

Similar projects

wallix/awless is written in Go, and is an excellent substitute for awscli with support for many AWS services. It has human friendly commands for use on the command line or in templates. Unlike aec its ec2 create instance command doesn't allow you to specify the EBS volume size, or add tags.

achiku/jungle is written in Python, and incorporates a smaller subset of ec2 commands and doesn't launch new instances. It does however have an ec2 ssh command. It also supports other AWS services like ELB, EMR, RDS.

Contributing

See CONTRIBUTING.md to get started and develop in this repo.

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

aec_cli-3.2.0.tar.gz (40.5 kB view details)

Uploaded Source

Built Distribution

aec_cli-3.2.0-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file aec_cli-3.2.0.tar.gz.

File metadata

  • Download URL: aec_cli-3.2.0.tar.gz
  • Upload date:
  • Size: 40.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for aec_cli-3.2.0.tar.gz
Algorithm Hash digest
SHA256 aef1155cebab3595e809de5b2d248292ba51a2e0fa911cbec66980cf791343da
MD5 68faff6e77303c9602f88514a9f3b90f
BLAKE2b-256 cc23bfe9f677b17354b84548047c691ebc7932d0fbf176272ba6bf626075ec6d

See more details on using hashes here.

File details

Details for the file aec_cli-3.2.0-py3-none-any.whl.

File metadata

  • Download URL: aec_cli-3.2.0-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for aec_cli-3.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1835ed9e098518ee4a95cf8d31e28b6649500382bbdc9cccf5f59d7a533215a9
MD5 b7e280dff58d1b4fa4e5ab072369ced5
BLAKE2b-256 518a9553ad3c12492f5b72815b9dbec6f458c6a688b1fe3c29c4abc4ed3785f1

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