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

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

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

Stops a query execution. Requires you to have access to the workgroup in which the query ran.

For code samples using the Amazon Web Services SDK for Java, see [Examples and Code Samples](http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the _Amazon Athena User Guide_.

## Headers

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

## Request body

- StopQueryExecutionInput
  - `QueryExecutionId` string, required — The unique ID of the query execution to stop.

## Response `200`

Success

- StopQueryExecutionOutput

## Other responses

- `480` — InternalServerException
- `481` — InvalidRequestException

---

[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)
