{"id":4965,"date":"2022-12-04T01:33:15","date_gmt":"2022-12-04T07:33:15","guid":{"rendered":"https:\/\/icesquare.com\/wordpress\/?p=4965"},"modified":"2023-12-27T18:34:40","modified_gmt":"2023-12-28T00:34:40","slug":"amazon-athenaerrorcode-internal_error_query_engine-amazon-athena-experienced-an-internal-error-while-executing-this-query-please-contact-aws-support-for-further-assistance-you-will-not-be-charg","status":"publish","type":"post","link":"https:\/\/icesquare.com\/wordpress\/amazon-athenaerrorcode-internal_error_query_engine-amazon-athena-experienced-an-internal-error-while-executing-this-query-please-contact-aws-support-for-further-assistance-you-will-not-be-charg\/","title":{"rendered":"[Amazon Athena][ErrorCode: INTERNAL_ERROR_QUERY_ENGINE] Amazon Athena experienced an internal error while executing this query. Please contact AWS support for further assistance. You will not be charged for this query. We apologize for the inconvenience."},"content":{"rendered":"<p>In the past couple months, I was developing an application that uses Amazon Athena. Amazon Athena is basically their own version of MariaDB ColumnStore, which is more integrated with their own infrastructures. Long story short, it is Amazon&#8217;s own MySQL database for big data engine. While I was checking out its new features, I tried some simple queries such as SELECT count(*) from my_table, and it throws out the following error:<\/p>\n<p>Here is the error message:<\/p>\n<pre>\r\n[ErrorCode: INTERNAL_ERROR_QUERY_ENGINE] Amazon Athena experienced an internal error while executing this query. Please contact AWS support for further assistance. You will not be charged for this query. We apologize for the inconvenience.\r\n<\/pre>\n<p>Obviously, the error message didn&#8217;t tell much about what was the problem.<\/p>\n<p>Here is my input:<\/p>\n<pre>\r\n$athenaClient->startQueryExecution(\r\n\t\tarray(\r\n\t\t\t'QueryExecutionContext' => array(\r\n\t\t\t\t'Catalog' \t=> 'AwsDataCatalog',\r\n        \t\t        'Database' \t=> 'my_database',\r\n\t\t\t),\r\n\t\t\t'QueryString' => 'SELECT * FROM \"my_database\".\"my_table\" limit 10;',\r\n\r\n\t\t\t'ResultConfiguration' => array(\r\n\t\t\t\t'OutputLocation' => 'S3:\/\/s3bucket\/my_folder\/', \r\n\t\t\t),\r\n\t\t\t'WorkGroup' => 'primary',\r\n\t\t\t\r\n\t\t)\r\n<\/pre>\n<p>Here is my output:<\/p>\n<pre>\r\n$athenaClient->GetQueryResults()\r\n\r\n[Status] => Array\r\n                (\r\n                    [State] => FAILED\r\n                    [StateChangeReason] => [ErrorCode: INTERNAL_ERROR_QUERY_ENGINE] Amazon Athena experienced an internal error while executing this query. Please contact AWS support for further assistance. You will not be charged for this query. We apologize for the inconvenience.\r\n                    [SubmissionDateTime] => Aws\\Api\\DateTimeResult Object\r\n                        (\r\n                            [date] => 2022-11-24 15:51:13.344000\r\n                            [timezone_type] => 3\r\n                            [timezone] => UTC\r\n                        )\r\n\r\n                    [CompletionDateTime] => Aws\\Api\\DateTimeResult Object\r\n                        (\r\n                            [date] => 2022-11-24 15:51:14.488000\r\n                            [timezone_type] => 3\r\n                            [timezone] => UTC\r\n                        )\r\n\r\n                    [AthenaError] => Array\r\n                        (\r\n                            [ErrorCategory] => 1\r\n                            [ErrorType] => 401\r\n                            [Retryable] => \r\n                            [ErrorMessage] => [ErrorCode: INTERNAL_ERROR_QUERY_ENGINE] Amazon Athena experienced an internal error while executing this query. Please contact AWS support for further assistance. You will not be charged for this query. We apologize for the inconvenience.\r\n                        )\r\n\r\n                )\r\n\r\n\r\n<\/pre>\n<p>So what was the problem? The problem had nothing to do with the query. Instead, it was my S3 bucket URL. The protocol of the URL needed to be in lower case, i.e., s3:\/\/, not S3:\/\/. After I changed it to lower case, everything worked fine.<\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the past couple months, I was developing an application that uses Amazon Athena. Amazon Athena is basically their own version of MariaDB ColumnStore, which is more integrated with their <a class=\"more-link\" href=\"https:\/\/icesquare.com\/wordpress\/amazon-athenaerrorcode-internal_error_query_engine-amazon-athena-experienced-an-internal-error-while-executing-this-query-please-contact-aws-support-for-further-assistance-you-will-not-be-charg\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[6],"tags":[],"class_list":["post-4965","post","type-post","status-publish","format-standard","hentry","category-technology"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p1sqzr-1i5","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":626,"url":"https:\/\/icesquare.com\/wordpress\/error-2006-hy000-at-line-172-mysql-server-has-gone-away\/","url_meta":{"origin":4965,"position":0},"title":"ERROR 2006 (HY000) at line 172: MySQL server has gone away","author":"Derrick","date":"April 13, 2010","format":false,"excerpt":"Today I imported the MySQL database and I got the following error: # mysql -u root -p db_test < test.db Enter password: ERROR 2006 (HY000) at line XX: MySQL server has gone away It is because the data (SQL query) is too large to imported. To solve this problem, simply\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2562,"url":"https:\/\/icesquare.com\/wordpress\/freebsd-9-zfs-one-or-more-devices-has-experienced-an-error-resulting-in-data-corruption-applications-may-be-affected\/","url_meta":{"origin":4965,"position":1},"title":"[FreeBSD+ZFS]One or more devices has experienced an error resulting in data corruption.  Applications may be affected.","author":"Derrick","date":"January 17, 2012","format":false,"excerpt":"When you check the ZFS status, you may find the following error message: One or more devices has experienced an error resulting in data corruption. Applications may be affected.. There can be million reasons to cause this error message showing up. Of course, 99% of them are caused by hardware\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3495,"url":"https:\/\/icesquare.com\/wordpress\/xampp-php-fatal-error-class-ziparchive-not-found\/","url_meta":{"origin":4965,"position":2},"title":"XAMPP &#8211; PHP Fatal error:  Class &#8216;ZipArchive&#8217; not found","author":"Derrick","date":"March 11, 2014","format":false,"excerpt":"I just finished writing a program written in PHP today. When I moved to the another environment, I found that the script didn't work. After some investigations, I found that the program stopped running because of the following error: PHP Fatal error: Class 'ZipArchive' not found in ... The error\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/icesquare.com\/wordpress\/wp-content\/uploads\/2014\/03\/xampp-logo.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1063,"url":"https:\/\/icesquare.com\/wordpress\/xampp-error-1-couldnt-start-apache-sorry-ive-no-idea-whats-going-wrong\/","url_meta":{"origin":4965,"position":3},"title":"XAMPP: Error 1! Couldn&#8217;t start Apache! &#8230; Sorry, I&#8217;ve no idea what&#8217;s going wrong.","author":"Derrick","date":"November 14, 2010","format":false,"excerpt":"Today I helped my friend to install XAMPP on a Debian system. When I tried to start the Apache webserver, I got the following message: #\/opt\/lampp\/lampp startapache XAMPP: Starting Apache with SSL (and PHP5)... XAMPP: Error 1! Couldn't start Apache! XAMPP: Starting diagnose... XAMPP: Sorry, I've no idea what's going\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2036,"url":"https:\/\/icesquare.com\/wordpress\/solvedtftp-error-code-2-access-violation\/","url_meta":{"origin":4965,"position":4},"title":"[Solved]TFTP: Error code 2: Access violation","author":"Derrick","date":"December 13, 2011","format":false,"excerpt":"This post is an extension of my original post on TFTP: How to Setup TFTP. Although the post was written for Ubuntu, the same idea can be applied to all systems. So, here is our problem. You set up a TFTP server. It starts fine. You upload a file, it\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/icesquare.com\/wordpress\/wp-content\/uploads\/2011\/11\/TFTP_Small.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":174,"url":"https:\/\/icesquare.com\/wordpress\/mount_smbfs-kldloadsmbfs-operation-not-permitted-solved\/","url_meta":{"origin":4965,"position":5},"title":"&#8220;mount_smbfs: kldload(smbfs): Operation not permitted&#8221; SOLVED!!!!","author":"Derrick","date":"July 28, 2009","format":false,"excerpt":"When I tried to mount a windows share from FreeBSD: sudo mount_smbfs -I WindowsBoxIPaddress \/\/username@WindowsBoxIPaddress\/WindowsShare \/mnt I always got this error: mount_smbfs: kldload(smbfs): Operation not permitted After searching this error message on Google, I found that all suggested solutions were related to running this command using sudo, which I already\u2026","rel":"","context":"In &quot;FreeBSD&quot;","block_context":{"text":"FreeBSD","link":"https:\/\/icesquare.com\/wordpress\/category\/sever-problem\/freebsd\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/4965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/comments?post=4965"}],"version-history":[{"count":7,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/4965\/revisions"}],"predecessor-version":[{"id":4978,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/4965\/revisions\/4978"}],"wp:attachment":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/media?parent=4965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/categories?post=4965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/tags?post=4965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}