As a developer working with AWS, I often found myself jumping between multiple EC2 instances. Connecting to them securely and efficiently was repetitive, and it usually meant bouncing between the AWS CLI and the Session Manager Plugin.
Those tools are powerful, but I wanted something simpler and faster for day-to-day use. That is why I built AWS SSH, a CLI tool with a small TUI that streamlines the process of connecting to EC2 instances.
Why I built AWS SSH
The AWS CLI and Session Manager Plugin already solve the core problem, but the workflow can still feel clumsy if you switch between instances often.
The main friction points for me were:
- Manually searching for instance IDs and typing long commands.
- Having no intuitive interface for picking the target instance.
- Needing extra steps whenever I wanted to switch regions.
I wanted a tool that reduced that overhead and made the flow interactive instead of procedural.
How AWS SSH works
AWS SSH is a wrapper around the AWS CLI and Session Manager Plugin. It uses those existing tools and puts a more ergonomic interface on top.
The basic flow looks like this:
- It fetches the EC2 instances available in your AWS account.
- It shows them in a TUI so you can search and select the one you want.
- Once selected, it starts the connection through AWS Session Manager.
It also supports region configuration. If you define regions in your AWS credentials file, the tool can search them automatically. If not, it asks you to pick a region at runtime.
Prerequisites
Before using AWS SSH, make sure these are installed and available in your PATH:
You can verify both with:
aws --version
session-manager-plugin --version
Installation
Download the latest release from the GitHub releases page, make it executable, and move it into your PATH.
chmod +x aws-ssh
mv aws-ssh /usr/local/bin/aws-ssh
On macOS, the first run may require allowing the binary from System Settings > Privacy & Security.
Usage
Run the tool like this:
aws-ssh [--profile|-p] [--region|-r] searchparam1 searchparam2 ...
That opens the interface, lets you filter the instance list, and then connects to the selected EC2 instance through AWS Session Manager.
Key features
- A simple TUI for selecting EC2 instances.
- Search support for narrowing down instances quickly.
- Region configuration through your AWS credentials file.
- Optional profile selection with
--profile.
Configuring regions
If you want the tool to search specific regions automatically, add a regions key to the relevant section in your .aws/credentials file:
[default]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET_KEY
regions = us-east-1,us-west-2
With that in place, AWS SSH will search those regions without asking each time.
Required AWS permissions
To run the tool, you need at least these IAM permissions:
ec2:DescribeInstancesssm:StartSession
An example policy looks like this:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ssm:StartSession"
],
"Resource": "*"
}
]
}
If you want tighter access control, you can scope Resource down to specific instances or tags.
Also make sure SSM is enabled on the target EC2 instance, with the required IAM role attached and the SSM agent installed and running. AWS documents that setup here:
Why this tool is useful
AWS SSH is meant to remove friction from a workflow that developers repeat constantly. If you manage one instance it is convenient. If you manage many, it becomes much more valuable.
Project links:
Top comments (0)