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

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

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

Creates a prepared statement for use with SQL queries in Athena.

## Headers

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

## Request body

- CreatePreparedStatementInput
  - `StatementName` string, required — The name of the prepared statement.
  - `WorkGroup` string, required — The name of the workgroup to which the prepared statement belongs.
  - `QueryStatement` string, required — The query string for the prepared statement.
  - `Description` string — The description of the prepared statement.

## Response `200`

Success

- CreatePreparedStatementOutput

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