Last active
July 1, 2020 19:58
-
-
Save crashGoBoom/9b7cb71623c34dcfb9d912d2f1d2a096 to your computer and use it in GitHub Desktop.
Local Port Forwarding with AWS SSM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: ./ssm_local.sh i-xxxxxxxxxx 80 | |
_instance_id="${1}" | |
_instance_port="${2}" | |
aws ssm start-session --target "${_instance_id}" \ | |
--document-name AWS-StartPortForwardingSession \ | |
--parameters "{\"portNumber\":[\"${_instance_port}\"],\"localPortNumber\":[\"9000\"]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment