AWS Systems Manager Session Manager provides shell access and port forwarding to managed instances over HTTPS, without open inbound ports or SSH keys. With sufficient IAM permissions it allows tunnelling to RDP, SSH or database ports on EC2 and hybrid-activated systems, using traffic to AWS endpoints that organizations commonly allow.
Forwards a local port to a port on the instance through the SSM channel.
aws ssm start-session --target <INSTANCE_ID> --document-name AWS-StartPortForwardingSession --parameters portNumber=3389,localPortNumber=3389
Forwards through the instance to another host reachable from it, using the instance as a pivot.
aws ssm start-session --target <INSTANCE_ID> --document-name AWS-StartPortForwardingSessionToRemoteHost --parameters host=<INTERNAL_HOST>,portNumber=<PORT>,localPortNumber=<LOCAL_PORT>
Interactive shell on the instance.
aws ssm start-session --target <INSTANCE_ID>