Error in Athena with Lambda function permission to check bucket ownership

0

How can I fix this error in Athena when using mysql connector:

GENERIC_USER_ERROR: Encountered an exception[java.lang.RuntimeException] from your LambdaFunction[arn:aws:lambda:eu-west-2:050253647064:function:tca-engine-infrastructure-common-rds-athenamysqlconnector] executed in context[retrieving meta-data] with message[Error while checking bucket ownership

I have tried changing the lambda function permissions even giving the lambda full s3 access but still getting the problem.

Thank you in advance.

Domenico

1 Answer
0

Hello.

Please check the Lambda function logs from CloudWatch Logs.
I saw the same error in a GitHub issue in the past, and at that time there was no network route to access S3 from Lambda, resulting in an error.
Additionally, if you are accessing S3 using a VPC endpoint, you must ensure that Lambda and S3 are in the same region.
https://github.com/awslabs/aws-athena-query-federation/issues/288

profile picture
EXPERT
answered a month 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.

Guidelines for Answering Questions