Skip to content

Simple CLI to connect or forward traffic to AWS EC2 instances. Requires aws-cli installed locally.

License

Notifications You must be signed in to change notification settings

Blockost/aws-connect-cli

Repository files navigation

aws-connect-cli

Contributor Covenant

Table of contents

  1. Overview
  2. Prerequisites
  3. Installation
  4. Configuration
  5. Need help or want to contribute ?
  6. Licence

Overview

aws-connect is an executable for Linux systems relying on AWS CLI that provides a user-friendly, prompt-based interface to connect to AWS EC2 instances securely. Its goal is to eliminate user-managed (and often unsecured) SSH keys, IP-whitelisting and VPC ports opening done via EC2 Security Groups 🔒.

Capabilities

With aws-connect, you can securely:

  • Connect to remote EC2 instances
  • Establish ssh tunnel (port forwarding) between your local machine and remote EC2 instances
  • Copy file between your local machine and remote EC2 instances

All of these actions are performed via AWS CLI and Session Manager using an existing AWS profile. All security concerns are handled by AWS VPC infrastructure and your mind is at peace 🧘🌼

Prerequisites

Installation

Via packaged executable

Each version hosted on Github provides an executable. You only have to download it, chmod +x it and you're good to go 🚀!

Via git clone

An alternative solution would be to clone this repository and build the executable locally from the sources. It's actually very fast, it only takes a few seconds to build it:

$ git clone [email protected]:Blockost/aws-connect-cli.git
$ cd aws-connect-cli
$ npm install && npm run build

The executable will be created in the dist/ folder.

Additionally, you can create a wrapper script in your local bin folder /usr/local/bin/ to run it from anywhere (and encapsulate the necessary config file for you 🏄). It also simplifies greatly the update process since you will only have to git pull and run npm install && npm run build again to use the latest version:

#!/bin/bash
set -e

WORKING_DIR=/home/ubuntu/aws-connect-cli

exec $WORKING_DIR/dist/aws-connect-cli -f $WORKING_DIR/config.yml "$@"

exit 0

Configuration

Configuration is pretty straightforward and use a single yaml file. By default, it looks for a file called config.yml in the same directory as the executable but you can override this by using -f following by the path to your config file.

You can find all configuration parameters in this example. It's highly recommended that you simply copy-paste this file and edit it to suit your needs (keeping all the comments, it might help 😉).

Need help or want to contribute ?

Use -h flag to show help. If you find a problem or would like to contribute, feel free to create an issue on the Github repository.

Before contributing, please read the code of conduct.

Licence

MIT © Simon Espigolé

About

Simple CLI to connect or forward traffic to AWS EC2 instances. Requires aws-cli installed locally.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published