Overview
fjall tunnel opens a secure AWS Session Manager (SSM) port-forwarding tunnel to your application’s database through a bastion host. Connect local database tools (pgAdmin, DBeaver, psql) to your private RDS instance without exposing it to the public internet.
Prerequisites
- AWS Session Manager plugin (
session-manager-plugin) installed - Valid AWS credentials with SSM permissions
- A deployed application with a bastion host and database
Usage
Arguments
| Argument | Description | Required |
|---|---|---|
app-name | Application name | No (auto-detected, or prompted if omitted) |
Options
| Option | Description | Example |
|---|---|---|
-d, --database <name> | Select a specific database (required when multiple exist) | -d analytics |
-l, --local-port <port> | Local port for the tunnel (defaults to the database port) | -l 5433 |
-v, --verbose | Show detailed output | -v |
--non-interactive | Force plain CLI output (no UI) | --non-interactive |
Basic usage
Open a tunnel to your application’s database:-d:
How it works
- Prerequisites: checks that the AWS Session Manager plugin is installed.
- Bastion discovery: finds the bastion host instance in your application’s VPC.
- Database discovery: discovers available RDS endpoints.
- Tunnel: opens an SSM port-forwarding session through the bastion to the database.
postgres (Instance)).
The tunnel stays open until you press Ctrl+C.
Connecting
Once the tunnel is open, connect with your preferred database tool. The connection string is displayed when the tunnel opens.Next Steps
fjall deploy
Deploy applications and infrastructure to AWS.
fjall list
List resources inside an application’s infrastructure.
fjall restore
Restore resources from AWS Backup recovery points.
fjall secrets
Manage application secrets backed by AWS Secrets Manager.