Add ability to have multiple --local-forwarding arguments to ec2-instance-connect ssh command #9101
Labels
customization
Issues related to CLI customizations (located in /awscli/customizations)
ec2-instance-connect
feature-request
A feature should be added or improved.
p2
This is a standard priority issue
Describe the feature
The aws ec2-instance-connect ssh command already takes in one parameter for a local forwarding string; the ssh program supports multiple local forwarding options so allowing multiple would help when there is more than one forwarding rule desired
Use Case
Often when connecting into a VPC to run something locally, you might have a database instance and a elastic cache instance or something similar. Being able to forward ports for both of them on a single command is simpler than running multiple ssh commands.
Proposed Solution
Wish I was more of a python developer, but it seems like there should be a way to tag an argument as one that can be provided multiple times and then just loop through those arguments when creating the ssh command and adding the "-L" options to it.
Other Information
I tried putting multiple --local-forwarding parameters but it only seems to use the last one
Acknowledgements
CLI version used
aws-cli/2.13.22 Python/3.11.5 Windows/10 exe/AMD64 prompt/off
Environment details (OS name and version, etc.)
Windows 11
The text was updated successfully, but these errors were encountered: