Describe the bug
I am able to start an SSM session for port forwarding and keep it up as long application traffic is constant, but idle time is about 30-90s then connection is killed. I have tried following:
-
Session Manager/General Preferences/Idle session timeout is set to 20min
-
I used AWS-StartPortForwardingSession document
-
I created a copy AWS-StartPortForwardingSession and added
"inputs": {
"idleSessionTimeout": "59"
},
-
I turned up logging and I see Processing stream data message of type: channel_closed\nExiting session with sessionId...
FWIW: My code fragement is this:
in := &ssm.StartSessionInput{
DocumentName: aws.String(opts.EffectiveDocumentName()),
Target: aws.String(instanceId),
Parameters: map[string][]string{
"localPortNumber": {strconv.Itoa(opts.LocalPort)},
"portNumber": {strconv.Itoa(opts.RemotePort)},
},
}
ses, err := ssm.NewFromConfig(cfg).StartSession(context.Background(), in)
return ses, instanceId, err
I'm using github.com/aws/session-manager-plugin v0.0.0-20220617200849-916aa5c1c241
Expected Behavior
Connection stays up for 20min to match preferences
Current Behavior
Connection is closed prematurely
Reproduction Steps
Connect to SSM
Open Window RDP client connection to windows EC2 host in VPC
Wait about 90s w/o moving mouse or doing anything in RDP window
Possible Solution
No response
Additional Information/Context
No response
SDK version used
github.com/aws/session-manager-plugin v0.0.0-20220617200849-916aa5c1c241
Environment details (Version of Go (go version)? OS name and version, etc.)
go 1.19.4
Describe the bug
I am able to start an SSM session for port forwarding and keep it up as long application traffic is constant, but idle time is about 30-90s then connection is killed. I have tried following:
Session Manager/General Preferences/Idle session timeout is set to 20min
I used AWS-StartPortForwardingSession document
I created a copy AWS-StartPortForwardingSession and added
"inputs": {
"idleSessionTimeout": "59"
},
I turned up logging and I see
Processing stream data message of type: channel_closed\nExiting session with sessionId...FWIW: My code fragement is this:
I'm using
github.com/aws/session-manager-plugin v0.0.0-20220617200849-916aa5c1c241Expected Behavior
Connection stays up for 20min to match preferences
Current Behavior
Connection is closed prematurely
Reproduction Steps
Connect to SSM
Open Window RDP client connection to windows EC2 host in VPC
Wait about 90s w/o moving mouse or doing anything in RDP window
Possible Solution
No response
Additional Information/Context
No response
SDK version used
github.com/aws/session-manager-plugin v0.0.0-20220617200849-916aa5c1c241
Environment details (Version of Go (
go version)? OS name and version, etc.)go 1.19.4