Amazon Athena experienced a permission error with Lambda

0

When I try to execute an Athena query by a Lambda function, I get the following error message:

{"ErrorCategory":2,"ErrorType":1500,"Retryable":false,"ErrorMessage":"Amazon Athena experienced a permission error. Please provide proper permission and submitting the query again. If the issue reoccurs, contact AWS support for further assistance. You will not be charged for this query. We apologize for the inconvenience."}

I added full permission for my lambda role:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": [
                "s3:*"
            ],
            "Resource": [
                "arn:aws:s3:::my-bucket/*",
                "arn:aws:s3:::my-bucket"
            ]
        },
        {
            "Sid": "VisualEditor2",
            "Effect": "Allow",
            "Action": "athena:*",
            "Resource": "*"
        }
    ]
}

With that lambda function, I could run the query successfully from my local. How can I find out which permission is missing when running AWS Lambda?

질문됨 일 년 전471회 조회
1개 답변
1
AWS
지원 엔지니어
답변함 일 년 전
AWS
전문가
검토됨 일 년 전
  • Thanks for your information. The issue has been resolved after adding below policy (when trigger athena.startQueryExecution(...), it will invoke a Athena's lambda connector): { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "lambda:InvokeFunction" ], "Resource": [ "arn:aws:lambda:us-west-2:accountID:function:test-datasource-connector" ] } ] }

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠