View session history - AWS Systems Manager

View session history

You can use the AWS Systems Manager console or the AWS Command Line Interface (AWS CLI) to view information about sessions in your account. In the console, you can view session details such as the following:

  • The ID of the session

  • Which user connected to a managed node through a session

  • The ID of the managed node

  • When the session began and ended

  • The status of the session

  • The location specified for storing session logs (if turned on)

Using the AWS CLI, you can view a list of sessions in your account, but not the additional details that are available in the console.

For information about logging session history information, see Enabling and disabling session activity logging.

Viewing session history (console)

You can use the AWS Systems Manager console to view details about the sessions in your account.

To view session history (console)
  1. Open the AWS Systems Manager console at

  2. In the navigation pane, choose Session Manager.

  3. Choose the Session history tab.


    If the Session Manager home page opens first, choose Configure Preferences and then choose the Session history tab.

Viewing session history (AWS CLI)

To view a list of sessions in your account using the AWS CLI, run the following command.

aws ssm describe-sessions \ --state History

This command returns only results for connections to targets initiated using Session Manager. It doesn't list connections made through other means, such as Remote Desktop Protocol (RDP) or the Secure Shell Protocol (SSH).

For information about other options you can use with the describe-sessions command, see describe-sessions in the AWS Systems Manager section of the AWS CLI Command Reference.