EC2 Instance Connect
Simfra provides a web-based terminal for connecting to running EC2 instances. Instead of SSH, it opens a shell directly inside the EC2 Docker container.
Prerequisites
SIMFRA_DOCKER=true- The EC2 instance must be in the
runningstate
Connecting to an Instance
- Open the EC2 service in the web console.
- Navigate to the instance detail page.
- Click the Connect button.
This opens a terminal session running /bin/sh inside the instance's Docker container.
Features
- Full terminal: Color support via xterm-256color, resize handling, and standard terminal capabilities.
- Session tracking: Each connection is tracked as an SSM session. It appears in
aws ssm describe-sessionsoutput. - No SSH required: EC2 instances in Simfra are Docker containers. There is no SSH daemon - Instance Connect provides shell access without it.
How It Works
The web console connects via WebSocket to /_simfra/ssm/web-terminal with query parameters:
| Parameter | Description |
|---|---|
accountId |
Account that owns the instance |
region |
Region where the instance is running |
instanceId |
EC2 instance ID (e.g., i-0abc123def456) |
The server attaches to the Docker container and bridges the WebSocket to a shell process inside it.
Comparison with SSM Session Manager
Simfra also implements SSM Session Manager (aws ssm start-session), which works with the standard AWS Session Manager Plugin. Instance Connect in the web console is a lighter alternative that requires no client-side tooling.