AWS systems-manager documentation change
Summary
Added PowerShell V5 examples for Session Manager sessions with port forwarding and connection details
Security assessment
Documents secure instance access via Session Manager (a security-focused service) but does not address a specific security flaw
Diff
diff --git a/systems-manager/latest/userguide/example_ssm_StartSession_section.md b/systems-manager/latest/userguide/example_ssm_StartSession_section.md index f46f0bc3c..7facbe39b 100644 --- a//systems-manager/latest/userguide/example_ssm_StartSession_section.md +++ b//systems-manager/latest/userguide/example_ssm_StartSession_section.md @@ -71,0 +72,55 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example initiates a connection to a target for a Session Manager session, enabling port forwarding. Note: You need to add Region parameter if not already set using AWSCredentials.** + + + Start-SSMSession -Target 'i-064578e5e7454488f' -DocumentName 'AWS-StartPortForwardingSession' -Parameter @{ localPortNumber = '8080'; portNumber = '80' } -Region 'us-west-1' + + +**Output:** + + + Starting session with SessionId: testUser-xi4glew849asyeryde34u4dfsdfy + Port 8080 opened for sessionId testUser-xi4glew849asyeryde34u4dfsdfy. + Waiting for connections... + +**Example 2: This example creates an interactive session with a specified instance for a Session Manager session.** + + + Start-SSMSession -Target 'i-1234567890abcdef0' -Region 'us-west-1' + + +**Output:** + + + Starting session with SessionId : testUser-xi4glew849asyeryde34u4dfsdfy + Windows PowerShell + Copyright (C) Microsoft Corporation. All rights reserved. + + Install the latest PowerShell for new features and improvements! + + PS C:\Windows\system32> whoami + ec2amaz-fnsdrwv\ec2-test-user + PS C:\Windows\system32> + +**Example 3: This example creates a session without connecting to it and returns the SessionId, StreamUrl, and TokenValue properties required to connect to the session.** + + + Start-SSMSession -Target 'i-1234567890abcdef0' -Region 'us-west-1' -DisablePluginInvocation + + +**Output:** + + + SessionId : testUser-xi4glew849asyeryde34u4dfsdfy + StreamUrl : {StreamUrl value redacted} + TokenValue : {Token value redacted} + ContentLength : 1207 + HttpStatusCode : OK + + * For API details, see [StartSession](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +