---
title: "POST /#X-Amz-Target=AmazonAthena.GetSession"
method: POST
path: "/#X-Amz-Target=AmazonAthena.GetSession"
---

# POST /#X-Amz-Target=AmazonAthena.GetSession

`POST /#X-Amz-Target=AmazonAthena.GetSession`

Gets the full details of a previously created session, including the session status and configuration.

## Headers

- `X-Amz-Target` 'AmazonAthena.GetSession', required

## Request body

- GetSessionRequest
  - `SessionId` string, required — The session ID.

## Response `200`

Success

- GetSessionResponse
  - `SessionId` string — The session ID.
  - `Description` string — The session description.
  - `WorkGroup` string — The workgroup to which the session belongs.
  - `EngineVersion` string — The engine version used by the session (for example, <code>PySpark engine version 3</code>). You can get a list of engine versions by calling <a>ListEngineVersions</a>.
  - `EngineConfiguration` object — Contains engine configuration information like DPU usage.
    - `CoordinatorDpuSize` integer — The number of DPUs to use for the coordinator. A coordinator is a special executor that orchestrates processing work and manages other executors in a notebook session.
    - `MaxConcurrentDpus` integer, required — The maximum number of DPUs that can run concurrently.
    - `DefaultExecutorDpuSize` integer — The default number of DPUs to use for executors. An executor is the smallest unit of compute that a notebook session can request from Athena.
    - `AdditionalConfigs` object — Contains additional notebook engine <code>MAP&lt;string, string&gt;</code> parameter mappings in the form of key-value pairs. To specify an Athena notebook that the Jupyter server will download and serve, specify a value for the <a>StartSessionRequest$NotebookVersion</a> field, and then add a key named <code>NotebookId</code> to <code>AdditionalConfigs</code> that has the value of the Athena notebook ID.
  - `NotebookVersion` string — The notebook version.
  - `SessionConfiguration` object — Contains the workgroup configuration information used by the session.
    - `ExecutionRole` string — The ARN of the execution role used for the session.
    - `WorkingDirectory` string — The Amazon S3 location that stores information for the notebook.
    - `IdleTimeoutSeconds` integer — The idle timeout in seconds for the session.
    - `EncryptionConfiguration` EncryptionConfiguration — If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example, <code>SSE_KMS</code> or <code>CSE_KMS</code>) and key information.
      - `EncryptionOption` 'SSE_S3' | 'SSE_KMS' | 'CSE_KMS', required — <p>Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (<code>SSE_S3</code>), server-side encryption with KMS-managed keys (<code>SSE_KMS</code>), or client-side encryption with KMS-managed keys (<code>CSE_KMS</code>) is used.</p> <p>If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used. It specifies whether query results must be encrypted, for all queries that run in this workgroup. </p>
      - `KmsKey` string — For <code>SSE_KMS</code> and <code>CSE_KMS</code>, this is the KMS key ARN or ID.
  - `Status` object — Contains information about the status of the session.
    - `StartDateTime` string, date-time — The date and time that the session started.
    - `LastModifiedDateTime` string, date-time — The most recent date and time that the session was modified.
    - `EndDateTime` string, date-time — The date and time that the session ended.
    - `IdleSinceDateTime` string, date-time — The date and time starting at which the session became idle. Can be empty if the session is not currently idle.
    - `State` 'CREATING' | 'CREATED' | 'IDLE' | 'BUSY' | 'TERMINATING' | 'TERMINATED' | 'DEGRADED' | 'FAILED' — <p>The state of the session. A description of each state follows.</p> <p> <code>CREATING</code> - The session is being started, including acquiring resources.</p> <p> <code>CREATED</code> - The session has been started.</p> <p> <code>IDLE</code> - The session is able to accept a calculation.</p> <p> <code>BUSY</code> - The session is processing another task and is unable to accept a calculation.</p> <p> <code>TERMINATING</code> - The session is in the process of shutting down.</p> <p> <code>TERMINATED</code> - The session and its resources are no longer running.</p> <p> <code>DEGRADED</code> - The session has no healthy coordinators.</p> <p> <code>FAILED</code> - Due to a failure, the session and its resources are no longer running.</p>
    - `StateChangeReason` string — The reason for the session state change (for example, canceled because the session was terminated).
  - `Statistics` object — Contains the DPU execution time.
    - `DpuExecutionInMillis` integer — The data processing unit execution time for a session in milliseconds.

## Other responses

- `480` — InternalServerException
- `481` — InvalidRequestException
- `482` — ResourceNotFoundException

---

[API](https://skmtc.net/aws/apis/athena.md) · [All operations](https://skmtc.net/aws/apis/athena/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/athena/versions/0aec8c61283d/schema)
