Posted On: Mar 13, 2020
Amazon Athena now publishes Amazon CloudWatch Events for query state transitions. When a query transitions between states -- for example, from Running to a terminal state such as Succeeded or Cancelled -- Athena publishes a query state change event to CloudWatch Events. The event contains information about the query state transition.
Previously, you could only view a query’s current state using Athena’s GetQueryExecution API. With this release, you can use Athena’s query state change events to receive near real-time notifications about your query state transitions. You can easily create custom rules to indicate which events are of interest to you and define the automated actions to take when an event matches a rule. For example, you can create a rule that invokes an AWS Lambda function to post-process the query results when a query has reached the Successful terminal state.
You can use the CloudWatch Events console, CloudWatch CLI, or AWS SDK to consume Athena query state change events.
For more information about Athena’s query state change events and for usage examples, please visit our documentation.
For information about CloudWatch Events, please visit What Is Amazon CloudWatch Events?
For information about how to get started with CloudWatch Events and set up rules, please visit Getting Started with CloudWatch Events.