aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).

Home Page:https://aws.amazon.com/systems-manager/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Specify local IP address when starting port forwarding session

txigreman opened this issue · comments

Port forwarding sessions always opens local port on IP 127.0.0.1. It would be great if any other IP of the loopback could be specified as parameter.

Examples:
aws ssm start-session --target $INSTANCE_ID --document-name AWS-StartPortForwardingSession --parameters '{"portNumber":["8080"], "localPortNumber":["80"], "localIpAddress":["127.1.2.3"]}'

aws ssm start-session --target $INSTANCE_ID --document-name AWS-StartPortForwardingSessionToRemoteHost --parameters '{"host":["my.rds.amazonaws.com"],"portNumber":["3306"], "localPortNumber":["3306"], "localIpAddress":["127.4.5.6"]}'

@txigreman Thank you for raising this feature request. We have captured it down and will evaluate when this request will be picked up from our priority queue.

Cheers,
Yuting

I came across this issue as I needed to port forward to the ip of host.docker.internal (which is mostly 172.17.0.1) and this will allow me to access the forwarded port from the docker container.

yes please. No sure why such a basic feature isn't implemented.

I could use this right now. I've been running SSM on my main dev machine to let a container hit a DB in RDS. I need to temporarily run the container on a secondary, headless dev machine, and was hoping it could use the existing tunnel on my main box.

Indeed, this is very much needed.