AWS Text Extraction

0

How to solve Access Denied Exception in AWS textract when uploading an image?

1 Answer
1

Assuming you are in the console, there are a few instances where you may receive an Access Denied error:

  • If the AWS Management Console tells you that you're not authorized to perform an action, then you must contact your administrator for assistance, and ask them to update your role's or user's policies. They will be able to grant you access to the action you are trying to perform. For instance the following example error occurs when a user tries to run DetectDocumentText on a test image but does not have textract:DetectDocumentText permissions:
User: arn:aws:iam::123456789012:user/userabc is not authorized to perform: textract:DetectDocumentText on resource: textimage.png
  • If you receive an error that you're not authorized to perform the iam:PassRole action, your policies must be updated to allow you to pass a role to Amazon Textract. When using Textract you can implicitly pass an existing role to the service instead of creating a new service role or service-linked role. To do this, you must have permissions to pass the role to the service. If not you may receive an error similar to the one below:
User: arn:aws:iam::123456789012:user/userabc is not authorized to perform: iam:PassRole

In this case, the user's policies must be updated to allow them to perform the iam:PassRole action

In summary, you may have access to the console and be able to consult existing resources, but additional permissions may be needed to have the service perform certain actions on your behalf, including detecting and analyzing a document. You can find more info here: https://docs.aws.amazon.com/textract/latest/dg/security_iam_troubleshoot.html#security_iam_troubleshoot-no-permissions

AWS
NZ
answered a year 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