Tip: access denied or insufficient permissions to access Athena:
If you have misconfigured your local secret (I did this!) or for some other reason have insufficient access to the Athena service, then the exception raised by Athena can appear a little obscure:
Typically, there is an UnrecognizedClientException when querying Athena under such conditions.
A full text example:
An error occurred (UnrecognizedClientException) when calling the StartQueryExecution operation: The security token included in the request is invalid.
In this case it is best to "check for horses before zebras" and first check that the AWS secret is correctly set in your local environment. So, verify the contents of your local AWS credentials file - see my Athena SQL README for details.
Otherwise, refer to the official Amazon AWS install guide.
Failing that, it could be that indeed, your account has insufficient permissions to access that particular REST API call on Athena. Consider using an alternative call, for example via the AWS CLI, or else contact your Athena administrator...
Comments
Post a Comment