Skip to main content

Easily ssh to your AWS EC2 instances

Project description

zec2

PyPI version Build Status

GitHub issues GitHub closed issues GitHub closed pull requests

PyPI - Python Version GitHub GitHub last commit

Easily manage your AWS EC2 instances

INSTALL

pip install zec2

CONFIGURE AWS CREDENTIALS

You should have this two files on your computer:

~/.aws/config:

[default]
region=your_aws_region
output=json

~/.aws/credentials:

[default]
aws_access_key_id=your_access_key_id
aws_secret_access_key=your_secret_access_key

To learn more about AWS credentials and how to install them on your computer, please read this: https://docs.aws.amazon.com/rekognition/latest/dg/setting-up.html

DIFFERENT AWS PROFILES

You can put as many profiles in your aws credentials file and call them with zec2:

# use default aws profile
> zec2 ls

# use different aws profile
> zec2 -p my_profile ls

Use this option with every command.

CLI COMMANDS

# list all EC2 instances
> zec2 ls

# list all EC2 instances using custom aws profile (applies to all commands)
> zec2 -p work ls

# live list all EC2 instances
> zec2 ls -f

# ssh to 1st instance from the list
> $(zec2 ssh 1)

# ssh using different user (the default is ec2-user)
> $(zec2 ssh 1 -u ubuntu)

# ssh using different pem key path (the default is ~/.ssh/__instance_key_pair__.pem)
> $(zec2 ssh 1 -i ~/path/to/key.pem)

# stop 1st EC2 instance from the list
> zec2 stop 1

# start 1st EC2 instance from the list
> zec2 start 1

# restart 1st EC2 instance from the list
> zec2 restart 1

# terminate 1st EC2 instance from the list
> zec2 terminate 1

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

zec2-0.5.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

zec2-0.5.0-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file zec2-0.5.0.tar.gz.

File metadata

  • Download URL: zec2-0.5.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for zec2-0.5.0.tar.gz
Algorithm Hash digest
SHA256 7b6a1be0774769adaaac2d98ffdbd7d51df7712ceb3012ce44b8a8cb6ae25caa
MD5 783b20be6493e813de96875c095ad4ee
BLAKE2b-256 0b2a0bf91a7d45d4d3089edb7cbcb9c1ea1aea4f01deaeee16edb55ff8387bf7

See more details on using hashes here.

File details

Details for the file zec2-0.5.0-py2.py3-none-any.whl.

File metadata

  • Download URL: zec2-0.5.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for zec2-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c2a79153ad33bea4e032be52263e96df2a910681d047eb609b8b315611a78873
MD5 8b8034fb78c87881b25b742518e5f3e6
BLAKE2b-256 60499a670e8416ea8a3ad7e50a358a879e44c0d3a7177f6ff9fa5c35cc44789f

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