Skip to content

SSM Port Forwarding fails on multiple simultaneous connections #1653

Answered by mmmorris1975
jylitalo asked this question in Q&A
Discussion options

You must be logged in to vote

I think you may be misunderstanding how the SSM Session API works, or there is some other detail left out of the report. The StartSession API call merely returns some credentials and a websocket endpoint for you to communicate with. It does not actually establish a connection with the host. The disconnect you are seeing is likely the timeout once AWS closes the connection because you aren't following up with the necessary websocket connection.

Take a look at my ssm-session-client repo for how this should be handled.
One note, my code doesn't handle multiplexed port forwarding either. However, the AWS CLI SSM plugin does

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by vudh1
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
guidance Question that needs advice or information. service-api This issue is due to a problem in a service API, not the SDK implementation. closing-soon This issue will automatically close in 4 days unless further comments are made.
2 participants
Converted from issue

This discussion was converted from issue #1189 on April 01, 2022 17:34.