Memo: SSM Session and Port Forwarding

Docs

Install

Session Manger Plugin

AWS SSM Proxy. Optional

Start basic ssh connection

    aws ssm start-session \
    --target i-askfsa8asld

Port Forwarding

aws ssm start-session \
    --target i-00e68c055d1c0b087 \
    --document-name AWS-StartPortForwardingSession \
    --parameters '{"portNumber":["remote-host-port"], "localPortNumber":["local-port"]}'

Port Forwarding to Remote host

aws ssm start-session \
    --target i-00e68c055d1c0b087 \
    --document-name AWS-StartPortForwardingSessionToRemoteHost \
    --parameters '{"host":["remote-host-ip"],"portNumber":["remote-host-port"], "localPortNumber":["local-port"]}'