- Newest
- Most votes
- Most comments
This could be due to boto3 version that doesn't have Athena get_query_runtime_statistics API [1].
By default, Glue pythonshell job uses boto3 version 1.21.21. However, this API was introduced in boto3 version 1.24.35 onwards. Similarly if you are running Glue Spark jobs, by default, Glue 3.0 uses boto3==1.18.50 [2] which doesn't have this API.
To address this you can upgrade boto3 version by passing following job parameters -
--addtional-python-modules boto3==1.34.131
Please note 1.34.131 is the latest version at the time of writing this. You can replace it with any version that has this API.
If you are using Glue Spark job you can also consider using version 4.0 which uses boto3==1.24.70.
[1]https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/athena/client/get_query_runtime_statistics.html [2]https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-libraries.html#glue-modules-provided
