Skip to content

Athena Query Error from a previously working query

0

Hello,

I'm getting an error on a query, even with a single day time frame window. This query has worked previously. The error being received is:

Amazon Athena experienced an internal error while executing this query. Please try submitting the query again and if the issue reoccurs, contact AWS support for further assistance. We apologize for the inconvenience. This query ran against the "_______" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: abc38451-0fb9-4f9e-b26b-2f2e3024dbe6

Is it possible to get some details based on that Query Id?

Thanks, Pete

asked 10 months ago164 views
2 Answers
0

The error you're experiencing, "Amazon Athena experienced an internal error while executing this query," is an INTERNAL_ERROR_QUERY_ENGINE error that occurs on the Athena query engine side. This type of error is not typically caused by user input but rather by an issue within Athena's system itself.

Unfortunately, the Query ID you provided (abc38451-0fb9-4f9e-b26b-2f2e3024dbe6) can only be used by AWS Support to investigate the specific details of your query execution. Regular users don't have access to query execution details using just the Query ID.

There are several possible reasons for this error:

  1. Temporary system issue: These errors can be transient and might resolve by simply retrying the query.

  2. Query complexity: Your query might be pushing the limits of Athena's query engine, especially if it involves complex joins or large datasets.

  3. Data issues: There could be unexpected issues with the data you're querying, such as corrupted files or inconsistencies.

  4. Service disruption: There might be ongoing issues with the Athena service in your region.

To address this issue, you can try:

  1. Retry the query: The error might be temporary.

  2. Simplify the query: Break it down into smaller parts to identify if a specific section is causing the issue.

  3. Check your data: Ensure all tables referenced exist and have the expected structure.

  4. Verify permissions: Make sure your IAM user/role has necessary permissions.

  5. Check Athena service status for your region.

If the problem persists after trying these steps, contacting AWS Support would be your best option as they can investigate the specific details using your Query ID.

Note that you won't be charged for queries that result in this error.
Sources
INTERNAL_ERROR_QUERY_ENGINE | AWS re:Post
Athena Query: Encountered INTERNAL_ERROR_QUERY_ENGINE Error | AWS re:Post
ATHENA INTERNAL_ERROR_QUERY_ENGINE | AWS re:Post
Query fails (inconsistency) after last athena update | AWS re:Post

answered 10 months ago
0

Can you rerun the query and set the LIMIT to 1. Also check the data source and that there is unexpected files. For example, you may have a file in the data source where there is a schema mismatch.

EXPERT
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.