View session history - Amazon Systems Manager
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

View session history

You can use the Amazon Systems Manager console or the Amazon Command Line Interface (Amazon 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 Amazon 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 Amazon Systems Manager console to view details about the sessions in your account.

To view session history (console)
  1. Open the Amazon Systems Manager console at https://console.amazonaws.cn/systems-manager/.

  2. In the navigation pane, choose Session Manager.

  3. Choose the Session history tab.

    -or-

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

Viewing session history (Amazon CLI)

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

aws ssm describe-sessions \ --state History
Note

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 Amazon Systems Manager section of the Amazon CLI Command Reference.