Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

terminate_session

terminate_session(**kwargs)

Permanently ends a session and closes the data connection between the Session Manager client and SSM Agent on the managed node. A terminated session can't be resumed.

See also: AWS API Documentation

Request Syntax

response = client.terminate_session(
    SessionId='string'
)
Parameters
SessionId (string) --

[REQUIRED]

The ID of the session to terminate.

Return type
dict
Returns
Response Syntax
{
    'SessionId': 'string'
}

Response Structure

  • (dict) --
    • SessionId (string) --

      The ID of the session that has been terminated.

Exceptions

  • SSM.Client.exceptions.InternalServerError