Skip to content

Conversation

troxil
Copy link

@troxil troxil commented Jun 3, 2024

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

@troxil troxil changed the title Add port-forward support, without SSH Add Port Forward Support - without SSH Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant