aws-gate
aws-gate copied to clipboard
Add Port Forward Support - without SSH
This adds a Port Forwarding Session support to aws-gate
.
This is based on the following to 2 SSM documents:
-
AWS-StartPortForwardingSession
-
AWS-StartPortForwardingSessionToRemoteHost
Reference:
I thought to bundle these 2 use cases under the same parser in aws-gate
because they do the exact same job baring where the forwarding target goes to.
Example Help
(venv) ➜ aws_gate git:(feat/add_session_forwarding) ✗ aws-gate port-forward --help
usage: aws-gate port-forward [-h] [-p PROFILE] [-r REGION] [--target_host TARGET_HOST] [--local_port LOCAL_PORT] instance_name target_port
positional arguments:
instance_name Instance we wish to open session to
target_port Port to forward to
optional arguments:
-h, --help show this help message and exit
-p PROFILE, --profile PROFILE
AWS profile to use
-r REGION, --region REGION
AWS region to use
--target_host TARGET_HOST
Host to forward into
--local_port LOCAL_PORT
Local port to forward to