Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

End a session

Focus mode
End a session - AWS Systems Manager

You can end a session that you started in your account using the AWS Systems Manager console or the AWS Command Line Interface (AWS CLI). When you choose the Terminate button for a session in the console or call the TerminateSession API action by using the AWS CLI, Session Manager permanently ends the session and closes the data connection between the Session Manager client and SSM Agent on the managed node. You can't resume a terminated session.

If there is no user activity in an open session for 20 minutes, the idle state triggers a timeout. Session Manager doesn't call TerminateSession, but it does close the underlying channel. You can't resume a session closed because of idle timeout.

We recommend always explicitly terminating a session by using the terminate-session command, when using the AWS CLI, or the Terminate button when using the console. (Terminate buttons are located on both the session window and main Session Manager console page.) If you only close a browser or command window, the session remains listed as Active in the console for 30 days. When you don't explicitly terminate a session, or when a session times out, any processes that were running on the managed node at the time will continue to run.

Ending a session (console)

You can use the AWS Systems Manager console to end a session in your account.

To end a session (console)
  1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems-manager/.

  2. In the navigation pane, choose Session Manager.

  3. For Sessions, choose the option button to the left of the session you want to end.

  4. Choose Terminate.

Ending a session (AWS CLI)

To end a session using the AWS CLI, run the following command. Replace session-id with your own information.

aws ssm terminate-session \ --session-id session-id

For more information about the terminate-session command, see terminate-session in the AWS Systems Manager section of the AWS CLI Command Reference.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.