Coder Social home page Coder Social logo

robertpeteuil / aws-quick-cli Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 3.0 76 KB

Control AWS EC2 instances using only their name (forget about Instance-Id's forever). Examples: aws-ssh NAME (connect via ssh), aws-list, aws-start NAME, aws-stop NAME

License: GNU General Public License v3.0

Shell 100.00%
aws aws-cli aws-ssh aws-cli-utilities aws-console cli ec2-instance ssh aws-shell ssh-config aws-manage

aws-quick-cli's Introduction

AWS Quick CLI

Easily control and ssh to AWS instances using their Name

Codacy Badge GitHub issues GitHub release lang license


AWS Quick CLI allows listing, starting, stopping and connecting to instances by name or instance-id.

Example of aws-list sub-utility:

Overview:

This utility suite consists of four utilities: aws-list, aws-start, aws-stop, and aws-ssh.

  • SSH to an Instance: aws-ssh NAME or aws-ssh -i ID

    • Additional parameters described in Details
  • List Instances: aws-list

    • Additional parameters described in Details
  • Start Instance: aws-start NAME or aws-start -i ID

  • Stop Instance: aws-stop NAME or aws-stop -i ID

Details

  • SSH to Instance: aws-ssh NAME or aws-ssh -i ID

    • automatically calculates login-name based on the image-type of the instance
    • override the calculated login-name -u USERNAME
    • connect without PEM keys (if properly configured) -p
    • command specific help aws-ssh -h
  • List Instances: aws-list

    • list all instances (default).
    • list running instances -r or --running
    • list stopped instances -s or --stopped
    • list instances with specified name aws-list NAME
    • list instance with specified instance-id aws-list -i ID
    • command specific help aws-list -h
  • Start Instance: aws-start NAME or aws-start -i ID

    • start instance by name or instance-id
    • command specific help aws-start -h
  • Stop Instance: aws-stop NAME or aws-stop -i ID

    • start instance by name or instance-id
    • command specific help aws-stop -h

Supported Platforms:

  • Linux
  • macOS (OS X)
  • Windows 10 'Bash on Windows'

Pre-Requisites:

  • The AWS CLI utilities must installed and configured
    • Do not install the AWS CLI via a package manager - this usually installs an outdated version which will not work with these utilities.
  • Instructions for installing the AWS-CLI utilities are included at the bottom of this README in the section Reference - Installation of AWS-CLI and or on the AWS Website.

Installation:

The utilities in the repo can be installed with curl

bash -c "`curl -s -L https://raw.github.com/robertpeteuil/aws-quick-cli/master/install.sh`"

If the repo has been downloaded locally, cd into the directory and run install.sh

cd aws-quick-cli
./install.sh

Reference - Installation of AWS-CLI

Pre-Requisites:
  • Installation requires Python 2 version 2.6.5+ or Python 3 version 3.3+
  • Installation requires the unzip command, which can be installed by typing sudo apt-get install unzip
  • Do not install the AWS CLI via a package manager - this may install an outdated version that's incompatible with these utilities.
  • For help or additional instruction see the AWS Website

Installation with sudo capabilities:

$ cd ~
$ mkdir tmpawsinstall
$ cd tmpawsinstall
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
$ unzip awscli-bundle.zip
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
$ cd ..
$ rm -rf tmpawsinstall

Installation without sudo capabilities:

$ cd ~
$ mkdir tmpawsinstall
$ cd tmpawsinstall
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
$ unzip awscli-bundle.zip
$ ./awscli-bundle/install -b ~/bin/aws
$ cd ..
$ rm -rf tmpawsinstall

Additional steps for non-sudo installations:

  • manually add the ~/bin directory to your PATH
  • This is performed by editing your shell profile
    • This file is either ~/.profile, ~/.bash_profile or ~/.bash_rc depending on your OS.

Configure the AWS CLI utilities

  • Configuration requires using your AWS Access Key ID # and AWS Secret Access Key and running the command: aws configure
  • If you don't have these, refer to the AWS getting started page
  • Check here for more information on configuring the AWS-CLI

aws-quick-cli's People

Contributors

robertpeteuil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

im-hanzou dhomane

aws-quick-cli's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.