Skip to navigation

Wake a suspended database

Beta

Start a suspended database’s compute and answer at once, without waiting for it to run. Poll GET /databases/{asset_id}/compute-status until it reports running. Waking a running database resets its idle clock and answers 200 with running, so it is safe to call before every batch of work. The same action as Resume Database in Athena; it needs edit access to the database.

A database suspends (scales to zero) after suspend_timeout_seconds without activity; GET/PATCH /databases/{asset_id}/settings read and set that window, and 0 keeps it running. Reading the compute status or the settings never wakes a suspended database. Two things do: POST /databases/{asset_id}/wake, which answers at once while the compute starts, or any request that runs SQL on it, such as POST /databases/{asset_id}/sql, which waits for the compute up to 120 seconds; if the compute is still starting then, the answer is 503 with Retry-After and the statement did not run. A cold start usually takes 30 seconds to 2 minutes.

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

asset_idstringRequired

Headers

X-Athena-Session-CredentialstringOptional

Response

The database was already running (idle clock reset)

asset_idstring
The database asset ID
statusenum

running: the compute was already running; its idle clock was reset. starting: the compute is starting; poll GET /databases/{asset_id}/compute-status until it reports running.

Allowed values:
messagestring or nullOptional
Optional detail from the control plane

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
501
Not Implemented Error
503
Service Unavailable Error