aws-samples / amazon-comprehend-semi-structured-documents-annotation-tools

Other
24 stars 15 forks source link

Error in invoking preHumanTaskLambdaFunc #3

Closed warriorjiang closed 2 years ago

warriorjiang commented 2 years ago

Hello, I have created the stack, and created the labeling job. But the job failed with below error: ClientError: Exception invoking the Lambda function arn:aws:lambda:us-east-1:xxxxxx:function:comprehend-custom-pdf-ext-GTPreHumanTaskLambdaFunc-kpFXoh0chHon. LambdaErrorCode: Unhandled. Ensure the Lambda function exists, that the role arn:aws:iam::xxxxxx:role/comprehend-custom-pdf-extra-SageMakerExecutionRole-925B9GVECD0W has permissions to invoke it and try your request again.

I have checked that that specific lambda func exists, and that specific IAM role has permissions to exec the func. Please let me know what are next steps to debug and resolve the failures. Thanks in advance!

IAM inline policy for the role: { "Version": "2012-10-17", "Statement": [ { "Action": [ "lambda:InvokeFunction" ], "Resource": [ "arn:aws:lambda:us-east-1:xxxxxx:function:comprehend-custom-pdf-ext-GTPreHumanTaskLambdaFunc-kpFXoh0chHon", "arn:aws:lambda:us-east-1:xxxxxx:function:comprehend-custom-pdf-ext-GTAnnotationConsolidatio-G21YerNdHKWY" ], "Effect": "Allow" } ] }

dnlen commented 2 years ago

Hi, could you check the lambda GTPreHumanTaskLambdaFunc logs and see if you can spot an error for the job.

warriorjiang commented 2 years ago

thanks. yes, figured out the errors