Setting AmazonTextractFullAccess for Root User

0

Hello, I am the only one who will be using any of AWS's services, so I made an account as a root user. I am having trouble running the example code here https://docs.aws.amazon.com/textract/latest/dg/analyzing-document-text.html, and I am wondering if that's because an account permission hasn't been properly configured. How do I give myself -- the root user -- AmazonTextractFullAccess and all the permissions I need? How do I troubleshoot this issue?

In case it's not a permissions issue, below is the code I ran and the error I got in AWS CLI, with "bucketname" and "documentname" with the appropriate names

aws textract analyze-document \
    --document "{\"S3Object\":{\"Bucket\":\"bucketname\",\"Name\":\" documentname\"}}" \
    --feature-types "[\"TABLES\"]" \
    --region us-east-1

aws: error: the following arguments are required: --document, --feature-types

2 Answers
1

Please try with the Linux Subsystem in Linux or the AWS CLI. Also the region of the bucket and the default one for your AWS CLI should be the same. I just tried the following and it worked.

aws textract analyze-document --document '{"S3Object":{"Bucket":"dus-idp-textract","Name":"pdf_table_1.png"}}' --feature-types '["TABLES"]' --region eu-west-1

[If you think my answer helped me, please consider accept it, thanks!]

profile pictureAWS
answered a year ago
0

The root user has all permissions, so it can not be a permissions issue: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html

But your command does not seem to be interpreted correct, so run it in a Cloud9 instance or a Linux Terminal with a role attached that allows for TextractFullAccess and also access to S3 in case you use your own document in your own bucket.

Also have to point out that it is not best practice to use the root user for anything but admin tasks, so better use a role attached to an instance (and secure your root account with MFA):

We strongly recommend that you do not use the root user for your everyday tasks, even the administrative ones. As a best practice, safeguard your root user credentials and don't use them for everyday tasks. Root user credentials are only used to perform a few account and service management tasks.
AWS
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