(invalidrequestexception) When Calling The Getqueryresults..... Querying Athena From Lambda Python.... Cannot Read Results
I have been trying to query Athena from my lambda function (Python3.8) but I keep getting the same error although tried adding an if else statement to check the status of the execu
Solution 1:
The problem is that you don't wait for the query to complete properly. You need to call get_query_execution
and check that the query has succeeded before you call get_query_results
.
There's a full example here that you could take inspiration from: https://www.ilkkapeltola.fi/2018/04/simple-way-to-query-amazon-athena-in.html
Post a Comment for "(invalidrequestexception) When Calling The Getqueryresults..... Querying Athena From Lambda Python.... Cannot Read Results"