End a session - AWS Systems Manager

End a session

You can use the AWS Systems Manager console or the AWS Command Line Interface (AWS CLI) to end a session that you started in your account. If there is no user activity after 20 minutes, a session is ended. After a session is ended, it can't be resumed.

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.


To use the AWS CLI to run session commands, the Session Manager plugin must also be installed on your local machine. For information, see (Optional) Install the Session Manager plugin for the AWS CLI.

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

session-id represents the ID of an active Session Manager session that you want to end permanently.

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