EMRServerless / Client / start_session

start_session

EMRServerless.Client.start_session(**kwargs)

Creates and starts a new session on the specified application. The application must be in the STARTED state or have AutoStart enabled, and have interactive sessions enabled. This operation is supported for EMR release 7.13.0 and later.

See also: AWS API Documentation

Request Syntax

response = client.start_session(
    applicationId='string',
    clientToken='string',
    executionRoleArn='string',
    configurationOverrides={
        'runtimeConfiguration': [
            {
                'classification': 'string',
                'properties': {
                    'string': 'string'
                },
                'configurations': {'... recursive ...'}
            },
        ]
    },
    tags={
        'string': 'string'
    },
    idleTimeoutMinutes=123,
    name='string'
)
Parameters:
  • applicationId (string) –

    [REQUIRED]

    The ID of the application on which to start the session.

  • clientToken (string) –

    [REQUIRED]

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token, the server returns the successful response without performing the operation again.

    This field is autopopulated if not provided.

  • executionRoleArn (string) –

    [REQUIRED]

    The execution role ARN for the session. Amazon EMR Serverless uses this role to access Amazon Web Services resources on your behalf during session execution.

  • configurationOverrides (dict) –

    The configuration overrides for the session. Only runtime configuration overrides are supported.

    • runtimeConfiguration (list) –

      The runtime configuration for the session. Contains Spark configuration properties specified at session creation time.

      • (dict) –

        A configuration specification to be used when provisioning an application. A configuration consists of a classification, properties, and optional nested configurations. A classification refers to an application-specific configuration file. Properties are the settings you want to change in that file.

        • classification (string) – [REQUIRED]

          The classification within a configuration.

        • properties (dict) –

          A set of properties specified within a configuration classification.

          • (string) –

            • (string) –

        • configurations (list) –

          A list of additional configurations to apply within a configuration object.

  • tags (dict) –

    The tags to assign to the session.

    • (string) –

      • (string) –

  • idleTimeoutMinutes (integer) – The idle timeout in minutes for the session. After the session remains idle for this duration, Amazon EMR Serverless automatically terminates it.

  • name (string) – The optional name for the session.

Return type:

dict

Returns:

Response Syntax

{
    'applicationId': 'string',
    'sessionId': 'string',
    'arn': 'string'
}

Response Structure

  • (dict) –

    • applicationId (string) –

      The output contains the application ID on which the session was started.

    • sessionId (string) –

      The output contains the ID of the session.

    • arn (string) –

      The output contains the ARN of the session.

Exceptions

  • EMRServerless.Client.exceptions.ValidationException

  • EMRServerless.Client.exceptions.ResourceNotFoundException

  • EMRServerless.Client.exceptions.InternalServerException

  • EMRServerless.Client.exceptions.ConflictException

  • EMRServerless.Client.exceptions.ServiceQuotaExceededException